fix a panic on startup when we fail to load the tipset

There may be a deeper issue here, but we need to handle this more gracefully
somehow. See #4358.
This commit is contained in:
Steven Allen 2020-10-13 15:06:47 -07:00
parent d5cea9f402
commit b61281ba4b

View File

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