From 6b6f2ad670711de3a570911b725df20c988fc1a7 Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Fri, 16 Oct 2020 10:23:47 +0200 Subject: [PATCH] core: mark every 30ths block as a bad block --- core/blockchain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index ce1edd9b7fb0..2eeedf55a8a7 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1841,6 +1841,9 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er return it.index, err } proctime := time.Since(start) + if block.NumberU64()%30 == 0 { + bc.reportBlock(block, receipts, err) + } // Update the metrics touched during block validation accountHashTimer.Update(statedb.AccountHashes) // Account hashes are complete, we can mark them