Skip to content

Commit cc718fb

Browse files
authored
test(eth): fix execution/inclusion off-by-one (#12642)
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.
1 parent 10bb065 commit cc718fb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

itests/eth_conformance_test.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -504,12 +504,15 @@ func waitForMessageWithEvents(ctx context.Context, t *testing.T, client *kit.Tes
504504
require.NoError(t, err)
505505
require.NotNil(t, msgHash)
506506

507-
ts, err := client.ChainGetTipSet(ctx, ret.TipSet)
507+
executionTs, err := client.ChainGetTipSet(ctx, ret.TipSet)
508508
require.NoError(t, err)
509509

510-
blockNumber := ethtypes.EthUint64(ts.Height())
510+
inclusionTs, err := client.ChainGetTipSet(ctx, executionTs.Parents())
511+
require.NoError(t, err)
512+
513+
blockNumber := ethtypes.EthUint64(inclusionTs.Height())
511514

512-
tsCid, err := ts.Key().Cid()
515+
tsCid, err := inclusionTs.Key().Cid()
513516
require.NoError(t, err)
514517

515518
blockHash, err := ethtypes.EthHashFromCid(tsCid)

0 commit comments

Comments
 (0)