From 93730fcddc2fa7751d809f5030cf842da9314280 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 fad478d846..b8e9be7da2 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 {