Commit e6d58cdc authored by Madhur Shrimal's avatar Madhur Shrimal

record l2 block

parent 1bc9f6e4
...@@ -382,6 +382,12 @@ func (l *L2OutputSubmitter) SendTransaction(ctx context.Context, tx *types.Trans ...@@ -382,6 +382,12 @@ func (l *L2OutputSubmitter) SendTransaction(ctx context.Context, tx *types.Trans
if l.metricsEnabled { if l.metricsEnabled {
// Emit the proposed block Number // Emit the proposed block Number
block, err := l.rollupClient.OutputAtBlock(ctx, receipt.BlockNumber.Uint64())
if err != nil {
l.log.Warn("unable to fetch block", "block_number", receipt.BlockNumber)
} else {
l.metr.RecordL2BlocksProposed(block.BlockRef)
}
} }
// The transaction was successfully submitted // The transaction was successfully submitted
......
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