From 3c87341bc6d09530f7d7f6367b4d6a68d2994bf3 Mon Sep 17 00:00:00 2001 From: keroro520 Date: Fri, 11 Aug 2023 18:57:25 +0800 Subject: [PATCH] chore: add log to record mapping between channel and block This commit adds a new log that prints out the channel ID and corresponding block number whenever a new block is added to a channel. This will help trace and debug the relationship between channels and blocks. --- op-batcher/batcher/channel_manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/op-batcher/batcher/channel_manager.go b/op-batcher/batcher/channel_manager.go index e5e82cde26d1..8a49b7db97e3 100644 --- a/op-batcher/batcher/channel_manager.go +++ b/op-batcher/batcher/channel_manager.go @@ -226,6 +226,8 @@ func (s *channelManager) processBlocks() error { } else if err != nil { return fmt.Errorf("adding block[%d] to channel builder: %w", i, err) } + s.log.Debug("Added block to channel", "channel", s.currentChannel.ID(), "block", block) + blocksAdded += 1 latestL2ref = l2BlockRefFromBlockAndL1Info(block, l1info) s.metr.RecordL2BlockInChannel(block)