aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-06-29 20:19:10 +0800
committerMartin Holst Swende <martin@swende.se>2017-06-29 20:19:10 +0800
commit8bbd598ef43be51f6dbd37b7d2b14501c8a4a6c3 (patch)
tree7dc8e5c0cc4df2151c4b029caa2e32eafaf7a4d4 /core
parentdfd076244dd0c2d809f9dd0080feab167ba9560c (diff)
downloaddexon-8bbd598ef43be51f6dbd37b7d2b14501c8a4a6c3.tar.gz
dexon-8bbd598ef43be51f6dbd37b7d2b14501c8a4a6c3.tar.zst
dexon-8bbd598ef43be51f6dbd37b7d2b14501c8a4a6c3.zip
core: fix an off-by-one when the block import counts blocks
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index aab2e72f3..6772ea284 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1073,7 +1073,7 @@ func (st *insertStats) report(chain []*types.Block, index int) {
}
log.Info("Imported new chain segment", context...)
- *st = insertStats{startTime: now, lastIndex: index}
+ *st = insertStats{startTime: now, lastIndex: index + 1}
}
}