From cc718fbf8eaea1609d5edfce24047f9ff645baa3 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 26 Oct 2024 14:14:40 +0000 Subject: [PATCH] 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. --- itests/eth_conformance_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/itests/eth_conformance_test.go b/itests/eth_conformance_test.go index 946db65ada4..e44df87b6ec 100644 --- a/itests/eth_conformance_test.go +++ b/itests/eth_conformance_test.go @@ -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)