From 5dc44340bb5f611bbfccd26ba5d6a1e02d442c7b Mon Sep 17 00:00:00 2001 From: georgehao Date: Fri, 26 Jul 2024 15:13:54 +0800 Subject: [PATCH] make a settled number --- rollup/internal/controller/watcher/bundle_proposer.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rollup/internal/controller/watcher/bundle_proposer.go b/rollup/internal/controller/watcher/bundle_proposer.go index 4c8becc69..ce9be0e36 100644 --- a/rollup/internal/controller/watcher/bundle_proposer.go +++ b/rollup/internal/controller/watcher/bundle_proposer.go @@ -38,8 +38,6 @@ type BundleProposer struct { bundleBatchesNum prometheus.Gauge bundleFirstBlockTimeoutReached prometheus.Counter bundleBatchesProposeNotEnoughTotal prometheus.Counter - - lastBundleId uint64 } // NewBundleProposer creates a new BundleProposer instance. @@ -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 } @@ -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