fsm: Allow manually resurrecting removed sectors
This commit is contained in:
parent
bf547112de
commit
11b041224e
7
extern/storage-sealing/fsm.go
vendored
7
extern/storage-sealing/fsm.go
vendored
@ -443,6 +443,13 @@ func (m *Sealing) ForceSectorState(ctx context.Context, id abi.SectorNumber, sta
|
|||||||
}
|
}
|
||||||
|
|
||||||
func final(events []statemachine.Event, state *SectorInfo) (uint64, error) {
|
func final(events []statemachine.Event, state *SectorInfo) (uint64, error) {
|
||||||
|
if len(events) > 0 {
|
||||||
|
if gm, ok := events[0].User.(globalMutator); ok {
|
||||||
|
gm.applyGlobal(state)
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0, xerrors.Errorf("didn't expect any events in state %s, got %+v", state.State, events)
|
return 0, xerrors.Errorf("didn't expect any events in state %s, got %+v", state.State, events)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user