Skip to content

Commit

Permalink
make a settled number
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehao committed Jul 26, 2024
1 parent f3f990e commit 5dc4434
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rollup/internal/controller/watcher/bundle_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ type BundleProposer struct {
bundleBatchesNum prometheus.Gauge
bundleFirstBlockTimeoutReached prometheus.Counter
bundleBatchesProposeNotEnoughTotal prometheus.Counter

lastBundleId uint64
}

// NewBundleProposer creates a new BundleProposer instance.
Expand Down Expand Up @@ -124,7 +122,6 @@ func (p *BundleProposer) updateDBBundleInfo(batches []*orm.Batch, codecVersion e
log.Error("update chunk info in orm failed", "err", err)
return err
}
p.lastBundleId = bundle.Index
return nil
}

Expand All @@ -135,8 +132,7 @@ func (p *BundleProposer) proposeBundle() error {
}

// select at most maxBlocksThisChunk blocks
//maxBatchesThisBundle := p.maxBatchNumPerBundle
maxBatchesThisBundle := p.lastBundleId%p.maxBatchNumPerBundle + 1
maxBatchesThisBundle := p.maxBatchNumPerBundle
batches, err := p.batchOrm.GetBatchesGEIndexGECodecVersion(p.ctx, firstUnbundledBatchIndex, encoding.CodecV3, int(maxBatchesThisBundle))
if err != nil {
return err
Expand Down

0 comments on commit 5dc4434

Please sign in to comment.