From db5f1d2235c99582539883204bb42ae31a64ad73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 23 Jan 2020 18:45:57 +0100 Subject: [PATCH] sealing: PreCommitFailed can go to SealFailed --- fsm.go | 1 + states_failed.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fsm.go b/fsm.go index 60bab48d0..ad0803488 100644 --- a/fsm.go +++ b/fsm.go @@ -63,6 +63,7 @@ var fsmPlanners = []func(events []statemachine.Event, state *SectorInfo) error{ api.PreCommitFailed: planOne( on(SectorRetryPreCommit{}, api.PreCommitting), on(SectorRetryWaitSeed{}, api.WaitSeed), + on(SectorSealFailed{}, api.SealFailed), ), api.Faulty: planOne( diff --git a/states_failed.go b/states_failed.go index fcef3b30c..4004edc90 100644 --- a/states_failed.go +++ b/states_failed.go @@ -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) return ctx.Send(SectorSealFailed{xerrors.Errorf("bad CommD error: %w", err)}) 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: return xerrors.Errorf("checkSeal sanity check error: %w", err) }