mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-12 19:16:41 +00:00
core: fix blockchain insert report time interval calculation (#21723)
This commit is contained in:
parent
85d81b2cdd
commit
91c4607979
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ func (st *insertStats) report(chain []*types.Block, index int, dirty common.Stor
|
||||||
// Fetch the timings for the batch
|
// Fetch the timings for the batch
|
||||||
var (
|
var (
|
||||||
now = mclock.Now()
|
now = mclock.Now()
|
||||||
elapsed = time.Duration(now) - time.Duration(st.startTime)
|
elapsed = now.Sub(st.startTime)
|
||||||
)
|
)
|
||||||
// If we're at the last block of the batch or report period reached, log
|
// If we're at the last block of the batch or report period reached, log
|
||||||
if index == len(chain)-1 || elapsed >= statsReportLimit {
|
if index == len(chain)-1 || elapsed >= statsReportLimit {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue