Merge commit 'a5a988c32098d8a3f56d4c284680f20aeed2fccb' into checkpoint/main_from_release_2.0.0_a5a988c32098d8a3f56d4c284680f20aeed2fccb

This commit is contained in:
Amine Khaldi 2023-08-08 21:49:48 +01:00
commit 6e68ec2302
No known key found for this signature in database
GPG Key ID: B1C074FFC904E2D9

View File

@ -57,7 +57,7 @@ async def get_average_block_time(
if newer_block.height < 1:
return None
prev_height = uint32(max(newer_block.height - 1, newer_block.height - height_distance))
prev_height = uint32(max(1, newer_block.height - height_distance))
prev_hash = blockchain.height_to_hash(prev_height)
assert prev_hash
prev_block = await blockchain.get_block_record_from_db(prev_hash)