Bugfix: searchback for a message should stop if we reach sender nonce of 0

This commit is contained in:
Aayush Rajasekaran 2020-06-03 14:08:05 -04:00
parent 8aa158d4e6
commit 4b01b666f6

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
}