From 66ad2b810237382e2365092ec606004ecd97acb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 19 Sep 2022 17:32:02 +0200 Subject: [PATCH] sealing: Avoid panicking in handleUpdateActivating on startup --- storage/pipeline/states_replica_update.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/pipeline/states_replica_update.go b/storage/pipeline/states_replica_update.go index a78d6dee8..9170f5fb5 100644 --- a/storage/pipeline/states_replica_update.go +++ b/storage/pipeline/states_replica_update.go @@ -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 {