core: use headers only where blocks are unnecessary
This commit is contained in:
@ -111,12 +111,12 @@ func (it *insertIterator) next() (*types.Block, error) {
|
||||
return it.chain[it.index], it.validator.ValidateBody(it.chain[it.index])
|
||||
}
|
||||
|
||||
// previous returns the previous block was being processed, or nil
|
||||
func (it *insertIterator) previous() *types.Block {
|
||||
// previous returns the previous header that was being processed, or nil.
|
||||
func (it *insertIterator) previous() *types.Header {
|
||||
if it.index < 1 {
|
||||
return nil
|
||||
}
|
||||
return it.chain[it.index-1]
|
||||
return it.chain[it.index-1].Header()
|
||||
}
|
||||
|
||||
// first returns the first block in the it.
|
||||
|
Reference in New Issue
Block a user