diff --git a/extern/storage-sealing/fsm.go b/extern/storage-sealing/fsm.go index 1f04abd56..4af860a54 100644 --- a/extern/storage-sealing/fsm.go +++ b/extern/storage-sealing/fsm.go @@ -143,6 +143,9 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto on(SectorRemoved{}, Removed), on(SectorRemoveFailed{}, RemoveFailed), ), + RemoveFailed: planOne( + // SectorRemove (global) + ), Faulty: planOne( on(SectorFaultReported{}, FaultReported), ), @@ -304,6 +307,9 @@ func (m *Sealing) plan(events []statemachine.Event, state *SectorInfo) (func(sta case Removed: return nil, processed, nil + case RemoveFailed: + return m.handleRemoveFailed, processed, nil + // Faults case Faulty: return m.handleFaulty, processed, nil diff --git a/extern/storage-sealing/states_failed.go b/extern/storage-sealing/states_failed.go index 85744edd4..7b6a7a892 100644 --- a/extern/storage-sealing/states_failed.go +++ b/extern/storage-sealing/states_failed.go @@ -244,6 +244,14 @@ func (m *Sealing) handleFinalizeFailed(ctx statemachine.Context, sector SectorIn return ctx.Send(SectorRetryFinalize{}) } +func (m *Sealing) handleRemoveFailed(ctx statemachine.Context, sector SectorInfo) error { + if err := failedCooldown(ctx, sector); err != nil { + return err + } + + return ctx.Send(SectorRemove{}) +} + func (m *Sealing) handleDealsExpired(ctx statemachine.Context, sector SectorInfo) error { // First make vary sure the sector isn't committed si, err := m.api.StateSectorGetInfo(ctx.Context(), m.maddr, sector.SectorNumber, nil)