Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Sep 19, 2024
1 parent 99916b2 commit 21d5f91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rollup/internal/controller/watcher/batch_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ func (p *BatchProposer) updateDBBatchInfo(batch *encoding.Batch, codecVersion en
p.batchProposeBlockHeight.Set(float64(lastBlock.Header.Number.Uint64()))
}

var totalL2GasUsed uint64
var totalGasUsed uint64
for _, chunk := range batch.Chunks {
totalL2GasUsed += chunk.L2GasUsed()
totalGasUsed += chunk.L2GasUsed()
}
p.batchProposeThroughput.Add(float64(totalL2GasUsed))
p.batchProposeThroughput.Add(float64(totalGasUsed))

p.proposeBatchUpdateInfoTotal.Inc()
err := p.db.Transaction(func(dbTX *gorm.DB) error {
Expand Down

0 comments on commit 21d5f91

Please sign in to comment.