Skip to content

Commit

Permalink
Merge pull request #9331 from filecoin-project/fix/no-upd-activating-…
Browse files Browse the repository at this point in the history
…panik

sealing: Avoid panicking in handleUpdateActivating on startup
  • Loading branch information
magik6k authored Sep 19, 2022
2 parents 862e885 + 66ad2b8 commit dacbdee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/pipeline/states_replica_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dacbdee

Please sign in to comment.