Skip to content

Commit

Permalink
Workaround for sealing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-vball committed Jul 18, 2022
1 parent 23d51e6 commit a72f3dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/pipeline/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sealing
import (
"bytes"
"context"
"time"

"golang.org/x/xerrors"

Expand Down Expand Up @@ -122,6 +123,8 @@ func checkPrecommit(ctx context.Context, maddr address.Address, si SectorInfo, t
if err != nil {
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 {
//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)}
Expand Down Expand Up @@ -151,6 +154,8 @@ func (m *Sealing) checkCommit(ctx context.Context, si SectorInfo, proof []byte,
if err != nil {
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 {
// not much more we can check here, basically try to wait for commit,
// and hope that this will work
Expand Down

0 comments on commit a72f3dc

Please sign in to comment.