Skip to content

Commit

Permalink
op-batcher: use pendingBlocks() for s.metr.RecordL2BlocksAdded (e…
Browse files Browse the repository at this point in the history
…thereum-optimism#13329)

* use pendingBlocks() for s.metr.RecordL2BlocksAdded

* use pendingBlocks when channel is opened
  • Loading branch information
geoknee authored Dec 10, 2024
1 parent 1866540 commit 370b77e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions op-batcher/batcher/channel_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (s *channelManager) ensureChannelWithSpace(l1Head eth.BlockID) error {
"max_frame_size", cfg.MaxFrameSize,
"use_blobs", cfg.UseBlobs,
)
s.metr.RecordChannelOpened(pc.ID(), s.blocks.Len())
s.metr.RecordChannelOpened(pc.ID(), s.pendingBlocks())

return nil
}
Expand Down Expand Up @@ -380,7 +380,7 @@ func (s *channelManager) processBlocks() error {

s.metr.RecordL2BlocksAdded(latestL2ref,
blocksAdded,
s.blocks.Len(),
s.pendingBlocks(),
s.currentChannel.InputBytes(),
s.currentChannel.ReadyBytes())
s.log.Debug("Added blocks to channel",
Expand Down

0 comments on commit 370b77e

Please sign in to comment.