Skip to content

Commit c17f3d7

Browse files
committed
cast error to Err class
1 parent 45677a6 commit c17f3d7

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
@@ -565,7 +565,8 @@ async def validate_block_body(
565565
prev_transaction_block_timestamp,
566566
)
567567
if error is not None:
568-
return error
568+
# TODO: standardise errors across Rust and Python so cast is not necesary here
569+
return Err(error)
569570

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

0 commit comments

Comments
 (0)