From f8791cf9952c9e316a39d9b2ab0bac26b5e88dd0 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 19 Feb 2024 16:23:38 +1100 Subject: [PATCH] Avoid duplicate messages when looking for receipts --- itests/direct_data_onboard_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/itests/direct_data_onboard_test.go b/itests/direct_data_onboard_test.go index fad478d84..b8e9be7da 100644 --- a/itests/direct_data_onboard_test.go +++ b/itests/direct_data_onboard_test.go @@ -498,10 +498,15 @@ func buildActorEventsFromMessages(ctx context.Context, t *testing.T, node v1api. head, err := node.ChainHead(ctx) require.NoError(t, err) + var lastts types.TipSetKey for height := 0; height < int(head.Height()); height++ { // for each tipset ts, err := node.ChainGetTipSetByHeight(ctx, abi.ChainEpoch(height), types.EmptyTSK) require.NoError(t, err) + if ts.Key() == lastts { + continue + } + lastts = ts.Key() messages, err := node.ChainGetMessagesInTipset(ctx, ts.Key()) require.NoError(t, err) if len(messages) == 0 {