checkpoint: into main from release/2.0.0 @ a5a988c320 (#15978)

Source hash: a5a988c320
Remaining commits: 6
This commit is contained in:
William Allen 2023-08-08 22:05:35 -05:00 committed by GitHub
commit 7c4e8a8538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)