Merge pull request #9055 from filecoin-project/gstuart/hacky-sealing-fix-backport
Fix: sealing: hacky sealing fix backport
This commit is contained in:
commit
ead1e6be68
@ -3,6 +3,7 @@ package sealing
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
"golang.org/x/xerrors"
|
"golang.org/x/xerrors"
|
||||||
|
|
||||||
@ -122,6 +123,8 @@ func checkPrecommit(ctx context.Context, maddr address.Address, si SectorInfo, t
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("checking if sector is allocated: %w", err)
|
return xerrors.Errorf("checking if sector is allocated: %w", err)
|
||||||
}
|
}
|
||||||
|
// TODO This is a very bad hack!! We are only using this while we investigate the compiler issue here.
|
||||||
|
time.Sleep(time.Nanosecond)
|
||||||
if alloc {
|
if alloc {
|
||||||
//committed P2 message but commit C2 message too late, pci should be null in this case
|
//committed P2 message but commit C2 message too late, pci should be null in this case
|
||||||
return &ErrSectorNumberAllocated{xerrors.Errorf("sector %d is allocated, but PreCommit info wasn't found on chain", si.SectorNumber)}
|
return &ErrSectorNumberAllocated{xerrors.Errorf("sector %d is allocated, but PreCommit info wasn't found on chain", si.SectorNumber)}
|
||||||
@ -151,6 +154,8 @@ func (m *Sealing) checkCommit(ctx context.Context, si SectorInfo, proof []byte,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("checking if sector is allocated: %w", err)
|
return xerrors.Errorf("checking if sector is allocated: %w", err)
|
||||||
}
|
}
|
||||||
|
// TODO This is a very bad hack!! We are only using this while we investigate the compiler issue here.
|
||||||
|
time.Sleep(time.Nanosecond)
|
||||||
if alloc {
|
if alloc {
|
||||||
// not much more we can check here, basically try to wait for commit,
|
// not much more we can check here, basically try to wait for commit,
|
||||||
// and hope that this will work
|
// and hope that this will work
|
||||||
|
Loading…
Reference in New Issue
Block a user