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.
This commit is contained in:
parent
42212808f0
commit
6891288787
@ -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…
Reference in New Issue
Block a user