diff --git a/extern/storage-sealing/fsm.go b/extern/storage-sealing/fsm.go index a026661359f..034433a59c6 100644 --- a/extern/storage-sealing/fsm.go +++ b/extern/storage-sealing/fsm.go @@ -320,7 +320,7 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto FaultReported: final, // not really supported right now FaultedFinal: final, - Removed: final, + Removed: finalRemoved, FailedUnrecoverable: final, } @@ -694,6 +694,12 @@ func (m *Sealing) ForceSectorState(ctx context.Context, id abi.SectorNumber, sta return m.sectors.Send(id, SectorForceState{state}) } +// as sector has been removed, it's no needs to care about later events, +// just returns length of events as `processed` is ok. +func finalRemoved(events []statemachine.Event, state *SectorInfo) (uint64, error) { + return uint64(len(events)), nil +} + func final(events []statemachine.Event, state *SectorInfo) (uint64, error) { if len(events) > 0 { if gm, ok := events[0].User.(globalMutator); ok {