From b6e250303e6eaa5e0d0a3b4d1a217094897de3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 22 Jun 2020 10:31:28 +0200 Subject: [PATCH] Handle missing on-chain precommit in WaitSeed --- states.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/states.go b/states.go index 9b0262871..e6f7b20c6 100644 --- a/states.go +++ b/states.go @@ -208,6 +208,9 @@ func (m *Sealing) handleWaitSeed(ctx statemachine.Context, sector SectorInfo) er if err != nil { return xerrors.Errorf("getting precommit info: %w", err) } + if pci == nil { + return ctx.Send(SectorChainPreCommitFailed{error: xerrors.Errorf("precommit info not found on chain")}) + } randHeight := pci.PreCommitEpoch + miner.PreCommitChallengeDelay