Skip to content

Commit

Permalink
Simplify double spend validation in validate_block_body.
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineKhaldi committed Sep 24, 2024
1 parent ff5b36f commit 556b3ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chia/consensus/block_body_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ async def validate_block_body(

# 14. Check for duplicate spends inside block
removal_counter = collections.Counter(removals)
for k, v in removal_counter.items():
if v > 1:
for count in removal_counter.values():
if count > 1:
return Err.DOUBLE_SPEND, None

# 15. Check if removals exist and were not previously spent. (unspent_db + diff_store + this_block)
Expand Down

0 comments on commit 556b3ac

Please sign in to comment.