From c3623e9af728f35ea3f3c3effdaeeba5d63d0dcf Mon Sep 17 00:00:00 2001 From: buddho Date: Mon, 1 Apr 2024 19:26:50 +0800 Subject: [PATCH] core: fix block report when chain is not setHead (#2352) --- core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index e8ea11e344..1ec98a09b4 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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