Skip to content

Commit

Permalink
Fixed inconsistent average block time
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Aug 3, 2023
1 parent 01a93dc commit 052777b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chia/rpc/full_node_rpc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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)
Expand Down

0 comments on commit 052777b

Please sign in to comment.