commit batcher: Fix min aggregate size check

This commit is contained in:
Łukasz Magiera 2021-06-01 12:27:22 +02:00
parent cd0a1c97fa
commit cb4eb487f4
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ func (b *CommitBatcher) maybeStartBatch(notif, after bool) ([]sealiface.CommitBa
var res []sealiface.CommitBatchRes
if total < cfg.MinCommitBatch || total < miner5.PreCommitSectorBatchMaxSize {
if total < cfg.MinCommitBatch || total < miner5.MinAggregatedSectors {
res, err = b.processIndividually()
} else {
res, err = b.processBatch(cfg)

View File

@ -271,7 +271,7 @@ func DefaultStorageMiner() *StorageMiner {
PreCommitBatchSlack: Duration(3 * time.Hour),
AggregateCommits: true,
MinCommitBatch: 1, // we must have at least one proof to aggregate
MinCommitBatch: miner5.MinAggregatedSectors, // we must have at least four proofs to aggregate
MaxCommitBatch: miner5.MaxAggregatedSectors, // this is the maximum aggregation per FIP13
CommitBatchWait: Duration(24 * time.Hour), // this can be up to 6 days
CommitBatchSlack: Duration(1 * time.Hour),