diff --git a/core/blockchain.go b/core/blockchain.go index 54f5291c889..a25e91aad07 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1817,10 +1817,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, [] } block, err = it.next() } - stats.queued += it.processed() - stats.ignored += it.remaining() - - // If there are any still remaining, mark as ignored return it.index, events, coalescedLogs, err // First block (and state) is known @@ -1839,7 +1835,6 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, [] // Some other error occurred, abort case err != nil: - stats.ignored += len(it.chain) bc.reportBlock(block, nil, err) return it.index, events, coalescedLogs, err } @@ -1944,10 +1939,8 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, [] if err := bc.addFutureBlock(block); err != nil { return it.index, events, coalescedLogs, err } - stats.queued++ } } - stats.ignored += it.remaining() // Append a single chain head event if we've progressed the chain if lastCanon != nil && bc.CurrentBlock().Hash() == lastCanon.Hash() { diff --git a/core/blockchain_insert.go b/core/blockchain_insert.go index b376b983636..d5ccd15d64c 100644 --- a/core/blockchain_insert.go +++ b/core/blockchain_insert.go @@ -27,10 +27,10 @@ import ( // insertStats tracks and reports on block insertion. type insertStats struct { - queued, processed, ignored int - usedGas uint64 - lastIndex int - startTime mclock.AbsTime + processed, ignored int + usedGas uint64 + lastIndex int + startTime mclock.AbsTime } // statsReportLimit is the time limit during import and export after which we @@ -65,9 +65,6 @@ func (st *insertStats) report(chain []*types.Block, index int, cache common.Stor } context = append(context, []interface{}{"dirty", cache}...) - if st.queued > 0 { - context = append(context, []interface{}{"queued", st.queued}...) - } if st.ignored > 0 { context = append(context, []interface{}{"ignored", st.ignored}...) } @@ -154,13 +151,3 @@ func (it *insertIterator) previous() *types.Header { func (it *insertIterator) first() *types.Block { return it.chain[0] } - -// remaining returns the number of remaining blocks. -func (it *insertIterator) remaining() int { - return len(it.chain) - it.index -} - -// processed returns the number of processed blocks. -func (it *insertIterator) processed() int { - return it.index + 1 -}