core: fix state flushing for catalyst mode (#26319)

The gcproc field tracks the amount of time spent processing blocks,
and is used to trigger a state flush to disk when a certain threshold is
reached. After the merge, single block insertion by CL is the most
common source of block processing time, but this time was not added
into gcproc.
pull/26330/head
Sina Mahmoodi 2 years ago committed by GitHub
parent 42212808f0
commit 6891288787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      core/blockchain.go

@ -1764,6 +1764,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals, setHead bool)
stats.report(chain, it.index, dirty, setHead)
if !setHead {
// After merge we expect few side chains. Simply count
// all blocks the CL gives us for GC processing time
bc.gcproc += proctime
return it.index, nil // Direct block insertion of a single block
}
switch status {

Loading…
Cancel
Save