storagefsm: Handle preCommitParams errors better

This commit is contained in:
Łukasz Magiera 2021-06-01 20:36:20 +02:00
parent b6b56320bf
commit 8b84e499c5

View File

@ -360,7 +360,7 @@ func (m *Sealing) handleSubmitPreCommitBatch(ctx statemachine.Context, sector Se
params, deposit, _, err := m.preCommitParams(ctx, sector)
if params == nil || err != nil {
return err
return ctx.Send(SectorChainPreCommitFailed{xerrors.Errorf("preCommitParams: %w", err)})
}
res, err := m.precommiter.AddPreCommit(ctx.Context(), sector, deposit, params)