aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_insert.go
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2019-02-04 20:30:19 +0800
committerMartin Holst Swende <martin@swende.se>2019-02-10 00:36:20 +0800
commit3a95128b22a239c8e7b878a40bb36b003ec36267 (patch)
tree3615ccb2b42cb30197ed6c6b902145318fc767f9 /core/blockchain_insert.go
parent631e2f07f62372106964352a03a2f793d2fe94dc (diff)
downloaddexon-3a95128b22a239c8e7b878a40bb36b003ec36267.tar
dexon-3a95128b22a239c8e7b878a40bb36b003ec36267.tar.gz
dexon-3a95128b22a239c8e7b878a40bb36b003ec36267.tar.bz2
dexon-3a95128b22a239c8e7b878a40bb36b003ec36267.tar.lz
dexon-3a95128b22a239c8e7b878a40bb36b003ec36267.tar.xz
dexon-3a95128b22a239c8e7b878a40bb36b003ec36267.tar.zst
dexon-3a95128b22a239c8e7b878a40bb36b003ec36267.zip
core: fix error in block iterator (#18986)
Diffstat (limited to 'core/blockchain_insert.go')
-rw-r--r--core/blockchain_insert.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/core/blockchain_insert.go b/core/blockchain_insert.go
index 70bea3544..cfa32c5aa 100644
--- a/core/blockchain_insert.go
+++ b/core/blockchain_insert.go
@@ -111,14 +111,6 @@ func (it *insertIterator) next() (*types.Block, error) {
return it.chain[it.index], it.validator.ValidateBody(it.chain[it.index])
}
-// current returns the current block that's being processed.
-func (it *insertIterator) current() *types.Block {
- if it.index < 0 || it.index+1 >= len(it.chain) {
- return nil
- }
- return it.chain[it.index]
-}
-
// previous returns the previous block was being processed, or nil
func (it *insertIterator) previous() *types.Block {
if it.index < 1 {