From ce0b99ee9dc382dbff9ccdf32d6b28a6016fe4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 17 Jun 2020 20:35:47 +0200 Subject: [PATCH] checkCommit: handle missing precommit in handlePreCommitWait --- states.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/states.go b/states.go index 62eb4c24e..9b0262871 100644 --- a/states.go +++ b/states.go @@ -182,6 +182,10 @@ func (m *Sealing) handlePreCommitting(ctx statemachine.Context, sector SectorInf } func (m *Sealing) handlePreCommitWait(ctx statemachine.Context, sector SectorInfo) error { + if sector.PreCommitMessage == nil { + return ctx.Send(SectorChainPreCommitFailed{xerrors.Errorf("precommit message was nil")}) + } + // would be ideal to just use the events.Called handler, but it wouldnt be able to handle individual message timeouts log.Info("Sector precommitted: ", sector.SectorNumber) mw, err := m.api.StateWaitMsg(ctx.Context(), *sector.PreCommitMessage)