mirror of https://github.com/status-im/nim-eth.git
Cleanup unneeded check in getBlockHeaders
This commit is contained in:
parent
1797b76351
commit
646a58dbc0
|
@ -10,8 +10,7 @@ proc getBlockHeaders*(db: AbstractChainDB,
|
|||
var foundBlock: BlockHeader
|
||||
if db.getBlockHeader(req.startBlock, foundBlock):
|
||||
result.add foundBlock
|
||||
# Quick sanity check for lower bounds, code should be safe though without.
|
||||
if not req.reverse or (foundBlock.blockNumber >= (req.skip + 1).toBlockNumber):
|
||||
|
||||
while uint64(result.len) < req.maxResults:
|
||||
if not req.reverse:
|
||||
if not db.getSuccessorHeader(foundBlock, foundBlock, req.skip):
|
||||
|
|
Loading…
Reference in New Issue