Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Nov 29, 2023
1 parent 75a83d7 commit 2349e33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chia/consensus/block_body_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ async def validate_block_body(
# and coins created after fork (additions_since_fork)
if rem in fork_info.removals_since_fork:
# This coin was spent in the fork
log.error(f"Err.DOUBLE_SPEND_IN_FORK {fork_info.removals_since_fork[rem]}")
return Err.DOUBLE_SPEND_IN_FORK, None
removals_from_db.append(rem)

Expand Down Expand Up @@ -438,7 +439,7 @@ async def validate_block_body(
# This coin is not in the current heaviest chain, so it must be in the fork
if rem not in fork_info.additions_since_fork:
# Check for spending a coin that does not exist in this fork
log.error(f"Err.UNKNOWN_UNSPENT: COIN ID: {rem} NPC RESULT: {npc_result}")
log.error(f"Err.UNKNOWN_UNSPENT: COIN ID: {rem} fork_info: {fork_info}")
return Err.UNKNOWN_UNSPENT, None
addition: ForkAdd = fork_info.additions_since_fork[rem]
new_coin_record: CoinRecord = CoinRecord(
Expand Down

0 comments on commit 2349e33

Please sign in to comment.