Commit 3c87341b authored by keroro520's avatar keroro520

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.
parent 36eb61bf
...@@ -226,6 +226,8 @@ func (s *channelManager) processBlocks() error { ...@@ -226,6 +226,8 @@ func (s *channelManager) processBlocks() error {
} else if err != nil { } else if err != nil {
return fmt.Errorf("adding block[%d] to channel builder: %w", i, err) 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 blocksAdded += 1
latestL2ref = l2BlockRefFromBlockAndL1Info(block, l1info) latestL2ref = l2BlockRefFromBlockAndL1Info(block, l1info)
s.metr.RecordL2BlockInChannel(block) s.metr.RecordL2BlockInChannel(block)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment