Skip to content

Commit

Permalink
test(eth): fix execution/inclusion off-by-one
Browse files Browse the repository at this point in the history
StateSearchMsg returns the tipset in which the message was executed to
make it easier to get receipts, the state root, etc. But the ETH API
cares about the inclusion tipset.
  • Loading branch information
Stebalien committed Oct 25, 2024
1 parent ab34467 commit e42e4c3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions itests/eth_conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,15 @@ func waitForMessageWithEvents(ctx context.Context, t *testing.T, client *kit.Tes
require.NoError(t, err)
require.NotNil(t, msgHash)

ts, err := client.ChainGetTipSet(ctx, ret.TipSet)
executionTs, err := client.ChainGetTipSet(ctx, ret.TipSet)
require.NoError(t, err)

blockNumber := ethtypes.EthUint64(ts.Height())
inclusionTs, err := client.ChainGetTipSet(ctx, executionTs.Parents())
require.NoError(t, err)

blockNumber := ethtypes.EthUint64(inclusionTs.Height())

tsCid, err := ts.Key().Cid()
tsCid, err := inclusionTs.Key().Cid()
require.NoError(t, err)

blockHash, err := ethtypes.EthHashFromCid(tsCid)
Expand Down

0 comments on commit e42e4c3

Please sign in to comment.