Skip to content

Commit

Permalink
Avoid duplicate messages when looking for receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Feb 21, 2024
1 parent 5ee59f6 commit b5cfab6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions itests/direct_data_onboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b5cfab6

Please sign in to comment.