Drop soms logs

This commit is contained in:
Aayush Rajasekaran 2021-06-09 12:26:20 -04:00
parent 71909c5642
commit dbb4e9fcc5
2 changed files with 4 additions and 3 deletions

View File

@ -456,17 +456,17 @@ func (b *CommitBatcher) Stop(ctx context.Context) error {
}
}
// TODO: If this returned epochs, it would make testing much easier
func (b *CommitBatcher) getCommitCutoff(si SectorInfo) (time.Time, error) {
tok, curEpoch, err := b.api.ChainHead(b.mctx)
if err != nil {
log.Errorf("getting chain head: %s", err)
return time.Now(), nil
return time.Now(), xerrors.Errorf("getting chain head: %s", err)
}
nv, err := b.api.StateNetworkVersion(b.mctx, tok)
if err != nil {
log.Errorf("getting network version: %s", err)
return time.Now(), err
return time.Now(), xerrors.Errorf("getting network version: %s", err)
}
pci, err := b.api.StateSectorPreCommitInfo(b.mctx, b.maddr, si.SectorNumber, tok)

View File

@ -334,6 +334,7 @@ func (b *PreCommitBatcher) Stop(ctx context.Context) error {
}
}
// TODO: If this returned epochs, it would make testing much easier
func getPreCommitCutoff(curEpoch abi.ChainEpoch, si SectorInfo) time.Time {
cutoffEpoch := si.TicketEpoch + policy.MaxPreCommitRandomnessLookback
for _, p := range si.Pieces {