mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-12 15:03:45 +00:00
logging block size
This commit is contained in:
parent
7b79e2ac24
commit
0893afdc14
2 changed files with 2 additions and 1 deletions
|
|
@ -589,7 +589,7 @@ func (c *Clique) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
|
||||||
// Assemble and return the final block for sealing.
|
// Assemble and return the final block for sealing.
|
||||||
block := types.NewBlock(header, txs, nil, receipts, trie.NewStackTrie(nil))
|
block := types.NewBlock(header, txs, nil, receipts, trie.NewStackTrie(nil))
|
||||||
|
|
||||||
log.Info("block_size_in_bytes: %v", int64(block.Size()))
|
fmt.Printf("clique.go block_size_in_bytes: %v", int64(block.Size()))
|
||||||
if metrics.Enabled {
|
if metrics.Enabled {
|
||||||
metrics.GetOrRegisterGauge(blockSizeGaugeName, nil).Update(int64(block.Size()))
|
metrics.GetOrRegisterGauge(blockSizeGaugeName, nil).Update(int64(block.Size()))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1122,6 +1122,7 @@ func (w *worker) commit(env *environment, interval func(), update bool, start ti
|
||||||
env := env.copy()
|
env := env.copy()
|
||||||
// Withdrawals are set to nil here, because this is only called in PoW.
|
// Withdrawals are set to nil here, because this is only called in PoW.
|
||||||
block, err := w.engine.FinalizeAndAssemble(w.chain, env.header, env.state, env.txs, nil, env.receipts, nil)
|
block, err := w.engine.FinalizeAndAssemble(w.chain, env.header, env.state, env.txs, nil, env.receipts, nil)
|
||||||
|
fmt.Printf("block_size_in_bytes: %v", int64(block.Size()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue