Skip to content

Commit 74aa717

Browse files
committed
cast error to Err class
1 parent b0ccbcd commit 74aa717

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

chia/_tests/blockchain/test_blockchain_transactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def test_basic_blockchain_tx(
9292
for coin in added_coins:
9393
unspent = await full_node_1.coin_store.get_coin_record(coin.name())
9494
assert unspent is not None
95-
assert not unspent.spent
95+
assert not unspent.spent()
9696
assert not unspent.coinbase
9797

9898
@pytest.mark.anyio

chia/consensus/block_body_validation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ async def validate_block_body(
566566
prev_transaction_block_timestamp,
567567
)
568568
if error is not None:
569-
return error
569+
# TODO: standardise errors across Rust and Python so cast is not necesary here
570+
return Err(error)
570571

571572
# 22. Verify aggregated signature is done in pre-validation
572573
if not block.transactions_info.aggregated_signature:

0 commit comments

Comments
 (0)