Skip to content

Commit

Permalink
core: fix blockchain insert report time interval calculation (#21723)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwanjo committed Oct 21, 2020
1 parent 85d81b2 commit 91c4607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain_insert.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 91c4607

Please sign in to comment.