From 91c460797967da491077cf23f9e25e76e0301d32 Mon Sep 17 00:00:00 2001 From: hwanjo <34005989+hwanjo@users.noreply.github.com> Date: Wed, 21 Oct 2020 23:53:30 +0900 Subject: [PATCH] core: fix blockchain insert report time interval calculation (#21723) --- core/blockchain_insert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/blockchain_insert.go b/core/blockchain_insert.go index 5685b0a4b..cb8473c08 100644 --- a/core/blockchain_insert.go +++ b/core/blockchain_insert.go @@ -43,7 +43,7 @@ func (st *insertStats) report(chain []*types.Block, index int, dirty 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 {