Merge pull request #9331 from filecoin-project/fix/no-upd-activating-panik

sealing: Avoid panicking in handleUpdateActivating on startup
This commit is contained in:
Łukasz Magiera 2022-09-19 17:42:21 +02:00 committed by GitHub
commit dacbdee85b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,10 @@ func (m *Sealing) handleFinalizeReplicaUpdate(ctx statemachine.Context, sector S
}
func (m *Sealing) handleUpdateActivating(ctx statemachine.Context, sector SectorInfo) error {
if sector.ReplicaUpdateMessage == nil {
return xerrors.Errorf("nil sector.ReplicaUpdateMessage!")
}
try := func() error {
mw, err := m.Api.StateWaitMsg(ctx.Context(), *sector.ReplicaUpdateMessage, build.MessageConfidence, api.LookbackNoLimit, true)
if err != nil {