mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
core: fix blockchain insert report time interval calculation (#21723)
This commit is contained in:
parent
8effe4cb28
commit
7929173dfd
@ -42,7 +42,7 @@ func (st *InsertStats) report(chain []*types.Block, index int, cache common.Stor
|
||||
// Fetch the timings for the batch
|
||||
var (
|
||||
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 index == len(chain)-1 || elapsed >= statsReportLimit {
|
||||
|
Loading…
Reference in New Issue
Block a user