Skip to content

Commit

Permalink
Merge pull request #1912 from filecoin-project/asr/statesearch
Browse files Browse the repository at this point in the history
search for a message should stop if we reach sender nonce of 0
  • Loading branch information
magik6k authored Jun 4, 2020
2 parents 6beabb5 + 4b01b66 commit bada564
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chain/stmgr/stmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,9 @@ func (sm *StateManager) searchBackForMsg(ctx context.Context, from *types.TipSet
return nil, nil, err
}

if act.Nonce < m.VMMessage().Nonce {
// nonce on chain is before message nonce we're looking for, its
// not going to be here
// we either have no messages from the sender, or the latest message we found has a lower nonce than the one being searched for,
// either way, no reason to lookback, it ain't there
if act.Nonce == 0 || act.Nonce < m.VMMessage().Nonce {
return nil, nil, nil
}

Expand Down

0 comments on commit bada564

Please sign in to comment.