Skip to content

Commit

Permalink
core: fix block report when chain is not setHead (#2352)
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 authored Apr 1, 2024
1 parent 32ac07f commit c3623e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
snapDiffItems, snapBufItems, _ = bc.snaps.Size()
}
trieDiffNodes, trieBufNodes, trieImmutableBufNodes, _ := bc.triedb.Size()
stats.report(chain, it.index, snapDiffItems, snapBufItems, trieDiffNodes, trieBufNodes, trieImmutableBufNodes, setHead)
stats.report(chain, it.index, snapDiffItems, snapBufItems, trieDiffNodes, trieBufNodes, trieImmutableBufNodes, status == CanonStatTy)

if !setHead {
// After merge we expect few side chains. Simply count
Expand Down

0 comments on commit c3623e9

Please sign in to comment.