Avoid duplicate messages when looking for receipts

This commit is contained in:
Rod Vagg 2024-02-19 16:23:38 +11:00 committed by Phi-rjan
parent 0c8dc1b158
commit f8791cf995

View File

@ -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 {