Skip to content

Commit

Permalink
fix a panic on startup when we fail to load the tipset
Browse files Browse the repository at this point in the history
There may be a deeper issue here, but we need to handle this more gracefully
somehow. See #4358.
  • Loading branch information
Stebalien committed Oct 13, 2020
1 parent d5cea9f commit b61281b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chain/messagepool/messagepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,10 @@ func (mp *MessagePool) addLoaded(m *types.SignedMessage) error {

curTs := mp.curTs

if curTs == nil {
return xerrors.Errorf("current tipset not loaded")
}

snonce, err := mp.getStateNonce(m.Message.From, curTs)
if err != nil {
return xerrors.Errorf("failed to look up actor state nonce: %s: %w", err, ErrSoftValidationFailure)
Expand Down

0 comments on commit b61281b

Please sign in to comment.