mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 17:13:57 +00:00
instrument when inserting known block
This commit is contained in:
parent
14d603b009
commit
023ade6d3d
1 changed files with 4 additions and 0 deletions
|
|
@ -1802,6 +1802,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
|
|||
return it.index, err
|
||||
}
|
||||
stats.processed++
|
||||
if bc.logger != nil {
|
||||
bc.logger.OnBlockStart(block, bc.GetTd(block.ParentHash(), block.NumberU64()-1), bc.CurrentFinalBlock(), bc.CurrentSafeBlock())
|
||||
bc.logger.OnBlockEnd(nil)
|
||||
}
|
||||
|
||||
// We can assume that logs are empty here, since the only way for consecutive
|
||||
// Clique blocks to have the same state is if there are no transactions.
|
||||
|
|
|
|||
Loading…
Reference in a new issue