core: fix error in block iterator (#18986)

This commit is contained in:
Martin Holst Swende
2019-02-04 13:30:19 +01:00
parent 631e2f07f6
commit 3a95128b22
2 changed files with 3 additions and 11 deletions

View File

@ -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 {