Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zsystm committed Sep 19, 2024
1 parent f90d2cf commit 3ebee39
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/x/evmengine/keeper/keeper_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ func TestKeeper_parseAndVerifyProposedPayload(t *testing.T) {
expectedErr: "invalid proposed payload number",
},
{
name: "fail: payload payload parent hash is not equal to head hash",
name: "fail: payload parent hash is not equal to head hash",
msg: func(c context.Context) *types.MsgExecutionPayload {
execHead, err := keeper.getExecutionHead(c)
require.NoError(t, err)

payload, err := ethclient.MakePayload(fuzzer, execHead.BlockHeight+1, uint64(now.Unix()), common.Hash{}, common.Address{}, common.Hash{}, &common.Hash{})
payload, err := ethclient.MakePayload(fuzzer, execHead.GetBlockHeight()+1, uint64(now.Unix()), common.Hash{}, common.Address{}, common.Hash{}, &common.Hash{})
require.NoError(t, err)

marshaled, err := json.Marshal(payload)
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestKeeper_parseAndVerifyProposedPayload(t *testing.T) {
execHead, err := keeper.getExecutionHead(c)
require.NoError(t, err)

payload, err := ethclient.MakePayload(fuzzer, execHead.BlockHeight+1, uint64(now.Unix()), execHead.Hash(), common.Address{}, common.Hash{}, &common.Hash{})
payload, err := ethclient.MakePayload(fuzzer, execHead.GetBlockHeight()+1, uint64(now.Unix()), execHead.Hash(), common.Address{}, common.Hash{}, &common.Hash{})
require.NoError(t, err)

marshaled, err := json.Marshal(payload)
Expand All @@ -179,7 +179,7 @@ func TestKeeper_parseAndVerifyProposedPayload(t *testing.T) {
execHead, err := keeper.getExecutionHead(c)
require.NoError(t, err)

payload, err := ethclient.MakePayload(fuzzer, execHead.BlockHeight+1, uint64(now.Unix()), execHead.Hash(), common.Address{}, execHead.Hash(), &common.Hash{})
payload, err := ethclient.MakePayload(fuzzer, execHead.GetBlockHeight()+1, uint64(now.Unix()), execHead.Hash(), common.Address{}, execHead.Hash(), &common.Hash{})
require.NoError(t, err)

marshaled, err := json.Marshal(payload)
Expand All @@ -195,7 +195,7 @@ func TestKeeper_parseAndVerifyProposedPayload(t *testing.T) {
require.NoError(t, err)
// update execution head with current block time
err = keeper.updateExecutionHead(c, engine.ExecutableData{
Number: execHead.BlockHeight,
Number: execHead.GetBlockHeight(),
BlockHash: common.BytesToHash(execHead.BlockHash),
Timestamp: uint64(now.Unix()),
})
Expand All @@ -204,6 +204,7 @@ func TestKeeper_parseAndVerifyProposedPayload(t *testing.T) {
// set block time to be less than execution block time
sdkCtx := sdk.UnwrapSDKContext(c)
sdkCtx = sdkCtx.WithBlockTime(now.Add(-24 * time.Hour))

return sdkCtx
},
msg: func(c context.Context) *types.MsgExecutionPayload {
Expand Down Expand Up @@ -239,6 +240,7 @@ func TestKeeper_parseAndVerifyProposedPayload(t *testing.T) {
}

func TestKeeper_setOptimisticPayload(t *testing.T) {
t.Parallel()
_, _, keeper := createKeeper(t, args{
height: 0,
current: 0,
Expand Down

0 comments on commit 3ebee39

Please sign in to comment.