Skip to content

Commit

Permalink
CHIA-1465 Simplify double spend validation in validate_block_body (#1…
Browse files Browse the repository at this point in the history
…8628)

Simplify double spend validation in validate_block_body.
  • Loading branch information
AmineKhaldi authored Sep 26, 2024
1 parent 44db523 commit 4383b6f
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 4383b6f

Please sign in to comment.