mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-24 19:19:21 +00:00
fix getPayloadBodiesByRange upper limit
This commit is contained in:
parent
c6e7ac1647
commit
3f0506b5bc
@ -537,7 +537,12 @@ proc handle_getPayloadBodiesByRange(com: CommonRef,
|
|||||||
|
|
||||||
let db = com.db
|
let db = com.db
|
||||||
var header: BlockHeader
|
var header: BlockHeader
|
||||||
for bn in start..<start+count:
|
var last = start+count-1
|
||||||
|
let current = com.syncCurrent.truncate(uint64)
|
||||||
|
if last > current:
|
||||||
|
last = current
|
||||||
|
|
||||||
|
for bn in start..last:
|
||||||
if not db.getBlockHeader(bn.toBlockNumber, header):
|
if not db.getBlockHeader(bn.toBlockNumber, header):
|
||||||
result.add none(ExecutionPayloadBodyV1)
|
result.add none(ExecutionPayloadBodyV1)
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user