Fix some failed precommit handling
This commit is contained in:
parent
49d64f7f7e
commit
f58e8bc9a3
8
extern/storage-sealing/states_failed.go
vendored
8
extern/storage-sealing/states_failed.go
vendored
@ -37,16 +37,16 @@ func (m *Sealing) checkPreCommitted(ctx statemachine.Context, sector SectorInfo)
|
||||
tok, _, err := m.api.ChainHead(ctx.Context())
|
||||
if err != nil {
|
||||
log.Errorf("handleSealPrecommit1Failed(%d): temp error: %+v", sector.SectorNumber, err)
|
||||
return nil, true
|
||||
return nil, false
|
||||
}
|
||||
|
||||
info, err := m.api.StateSectorPreCommitInfo(ctx.Context(), m.maddr, sector.SectorNumber, tok)
|
||||
if err != nil {
|
||||
log.Errorf("handleSealPrecommit1Failed(%d): temp error: %+v", sector.SectorNumber, err)
|
||||
return nil, true
|
||||
return nil, false
|
||||
}
|
||||
|
||||
return info, false
|
||||
return info, true
|
||||
}
|
||||
|
||||
func (m *Sealing) handleSealPrecommit1Failed(ctx statemachine.Context, sector SectorInfo) error {
|
||||
@ -107,7 +107,7 @@ func (m *Sealing) handlePreCommitFailed(ctx statemachine.Context, sector SectorI
|
||||
}
|
||||
|
||||
if pci, is := m.checkPreCommitted(ctx, sector); is && pci != nil {
|
||||
if sector.PreCommitMessage != nil {
|
||||
if sector.PreCommitMessage == nil {
|
||||
log.Warn("sector %d is precommitted on chain, but we don't have precommit message", sector.SectorNumber)
|
||||
return ctx.Send(SectorPreCommitLanded{TipSet: tok})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user