Merge pull request #1912 from filecoin-project/asr/statesearch

search for a message should stop if we reach sender nonce of 0
This commit is contained in:
Łukasz Magiera 2020-06-04 23:42:16 +02:00 committed by GitHub
commit bada564c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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