Skip to content

Commit

Permalink
test(eth): fix execution/inclusion off-by-one (#12642)
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 authored Oct 26, 2024
1 parent 10bb065 commit cc718fb
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 cc718fb

Please sign in to comment.