diff options
author | Martin Holst Swende <martin@swende.se> | 2019-02-04 20:30:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-04 20:30:19 +0800 |
commit | ec3432bccbb058567c0ea3f1e6537460f1f0aa29 (patch) | |
tree | d1fb6ed556da64fad32e4ea32b9af303a0f284f4 /core/blockchain_insert.go | |
parent | bb7c786b093b1277f59b2611a32bee2591b1a9ab (diff) | |
download | go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.tar go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.tar.gz go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.tar.bz2 go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.tar.lz go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.tar.xz go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.tar.zst go-tangerine-ec3432bccbb058567c0ea3f1e6537460f1f0aa29.zip |
core: fix error in block iterator (#18986)
Diffstat (limited to 'core/blockchain_insert.go')
-rw-r--r-- | core/blockchain_insert.go | 8 |
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 { |