adding block size in bytes as a log

This commit is contained in:
kant 2023-11-30 11:00:12 -08:00
parent b0295085f4
commit 7b79e2ac24

View file

@ -589,6 +589,7 @@ func (c *Clique) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
// Assemble and return the final block for sealing.
block := types.NewBlock(header, txs, nil, receipts, trie.NewStackTrie(nil))
log.Info("block_size_in_bytes: %v", int64(block.Size()))
if metrics.Enabled {
metrics.GetOrRegisterGauge(blockSizeGaugeName, nil).Update(int64(block.Size()))
}