mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
core: drop redundant WaitPrefetch in BAL block stats path
The BAL block has been verified and committed by the time we reach the read-time accounting block, so the prefetcher (whose workload is bounded by the BAL contents) has no outstanding tasks to wait on.
This commit is contained in:
parent
adb545b20c
commit
3cdb836553
1 changed files with 3 additions and 4 deletions
|
|
@ -684,10 +684,9 @@ func (bc *BlockChain) processBlockWithAccessList(parentRoot common.Hash, block *
|
||||||
stats.Prefetch = m.StatePrefetch
|
stats.Prefetch = m.StatePrefetch
|
||||||
}
|
}
|
||||||
// Sum read times across per-tx execution, BAL state-transition, and
|
// Sum read times across per-tx execution, BAL state-transition, and
|
||||||
// prefetcher async fetches. Sum-of-CPU-time, not wall-clock.
|
// prefetcher async fetches. Sum-of-CPU-time, not wall-clock. No
|
||||||
if w, ok := prefetchReader.(interface{ WaitPrefetch() }); ok {
|
// WaitPrefetch needed: state is already committed, so the prefetcher
|
||||||
w.WaitPrefetch() // ensure all prefetcher reads are accounted for
|
// (bounded by BAL contents) has drained.
|
||||||
}
|
|
||||||
var prefetchAccountReads, prefetchStorageReads time.Duration
|
var prefetchAccountReads, prefetchStorageReads time.Duration
|
||||||
if pr, ok := prefetchReader.(interface {
|
if pr, ok := prefetchReader.(interface {
|
||||||
PrefetchReadTimes() (time.Duration, time.Duration)
|
PrefetchReadTimes() (time.Duration, time.Duration)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue