sealing: Avoid panicking in handleUpdateActivating on startup

This commit is contained in:
Łukasz Magiera 2022-09-19 17:32:02 +02:00
parent 4cdeb6cdb1
commit 66ad2b8102

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 {