fix: sealing: Fix RetryCommitWait loop when sector cron activation fails

This commit is contained in:
Łukasz Magiera 2023-07-04 13:35:49 +02:00
parent 017f20c346
commit 9b52b06ea9

View File

@ -301,8 +301,21 @@ func (m *Sealing) handleCommitFailed(ctx statemachine.Context, sector SectorInfo
switch mw.Receipt.ExitCode { switch mw.Receipt.ExitCode {
case exitcode.Ok: case exitcode.Ok:
// API error in CcommitWait si, err := m.Api.StateSectorGetInfo(ctx.Context(), m.maddr, sector.SectorNumber, mw.TipSet)
if err != nil {
// API error
if err := failedCooldown(ctx, sector); err != nil {
return err
}
return ctx.Send(SectorRetryCommitWait{}) return ctx.Send(SectorRetryCommitWait{})
}
if si != nil {
// API error in CommitWait?
return ctx.Send(SectorRetryCommitWait{})
}
// if si == nil, something else went wrong; Likely expired deals, we'll
// find out in checkCommit
case exitcode.SysErrOutOfGas: case exitcode.SysErrOutOfGas:
// API error in CommitWait AND gas estimator guessed a wrong number in SubmitCommit // API error in CommitWait AND gas estimator guessed a wrong number in SubmitCommit
return ctx.Send(SectorRetrySubmitCommit{}) return ctx.Send(SectorRetrySubmitCommit{})