removing blocksize metric from worker

This commit is contained in:
kant 2023-11-30 17:52:50 -08:00
parent bbc42f5279
commit c244b5fbb9

View file

@ -19,7 +19,6 @@ package miner
import (
"errors"
"fmt"
"github.com/ethereum/go-ethereum/metrics"
"math/big"
"sync"
"sync/atomic"
@ -78,8 +77,6 @@ var (
errBlockInterruptedByNewHead = errors.New("new head arrived while building block")
errBlockInterruptedByRecommit = errors.New("recommit interrupt while building block")
errBlockInterruptedByTimeout = errors.New("timeout while building block")
blockSizeGaugeName = "clique/block_size_in_bytes"
)
// environment is the worker's current environment and holds all
@ -1125,9 +1122,6 @@ func (w *worker) commit(env *environment, interval func(), update bool, start ti
env := env.copy()
// 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)
if metrics.Enabled {
metrics.GetOrRegisterGauge(blockSizeGaugeName, nil).Update(int64(block.Size()))
}
if err != nil {
return err
}