sealing: PreCommitFailed can go to SealFailed

This commit is contained in:
Łukasz Magiera 2020-01-23 18:45:57 +01:00
parent 75670290fe
commit db5f1d2235
2 changed files with 2 additions and 1 deletions

1
fsm.go
View File

@ -63,6 +63,7 @@ var fsmPlanners = []func(events []statemachine.Event, state *SectorInfo) error{
api.PreCommitFailed: planOne( api.PreCommitFailed: planOne(
on(SectorRetryPreCommit{}, api.PreCommitting), on(SectorRetryPreCommit{}, api.PreCommitting),
on(SectorRetryWaitSeed{}, api.WaitSeed), on(SectorRetryWaitSeed{}, api.WaitSeed),
on(SectorSealFailed{}, api.SealFailed),
), ),
api.Faulty: planOne( api.Faulty: planOne(

View File

@ -80,7 +80,7 @@ func (m *Sealing) handlePreCommitFailed(ctx statemachine.Context, sector SectorI
case *ErrBadCommD: // TODO: Should this just back to packing? (not really needed since handleUnsealed will do that too) case *ErrBadCommD: // TODO: Should this just back to packing? (not really needed since handleUnsealed will do that too)
return ctx.Send(SectorSealFailed{xerrors.Errorf("bad CommD error: %w", err)}) return ctx.Send(SectorSealFailed{xerrors.Errorf("bad CommD error: %w", err)})
case *ErrExpiredTicket: case *ErrExpiredTicket:
return ctx.Send(SectorSealFailed{xerrors.Errorf("bad CommD error: %w", err)}) return ctx.Send(SectorSealFailed{xerrors.Errorf("ticket expired error: %w", err)})
default: default:
return xerrors.Errorf("checkSeal sanity check error: %w", err) return xerrors.Errorf("checkSeal sanity check error: %w", err)
} }