Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Quexington committed Oct 17, 2023
1 parent 995bb52 commit c9af97b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chia/wallet/util/compute_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def compute_spend_hints_and_additions(

hinted_coins: Dict[bytes32, HintedCoin] = {}
for condition in result_program.as_iter():
if cost > max_cost:
if cost > max_cost: # pragma: no cover
raise ValidationError(Err.BLOCK_COST_EXCEEDS_MAX, "compute_spend_hints_and_additions() for CoinSpend")
atoms = condition.as_iter()
op = next(atoms).atom
Expand Down
4 changes: 3 additions & 1 deletion tests/wallet/vc_wallet/test_vc_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ async def check_length(length: int, func: Callable[..., Awaitable[Any]], *args:
"flags_needed": cr_cat_wallet_0.info.proofs_checker.flags,
} == (await client_0.get_wallets(wallet_type=cr_cat_wallet_0.type()))[0]
assert await wallet_node_0.wallet_state_manager.get_wallet_for_asset_id(cr_cat_wallet_0.get_asset_id()) is not None
wallet_1_addr = encode_puzzle_hash(await wallet_1.get_new_puzzlehash(), "txch")
wallet_1_ph = await wallet_1.get_new_puzzlehash()
wallet_1_addr = encode_puzzle_hash(wallet_1_ph, "txch")
tx = await client_0.cat_spend(
cr_cat_wallet_0.id(),
DEFAULT_TX_CONFIG,
Expand Down Expand Up @@ -295,6 +296,7 @@ async def check_length(length: int, func: Callable[..., Awaitable[Any]], *args:
"asset_id": cr_cat_wallet_1.get_asset_id(),
"fingerprint": wallet_node_1.logged_in_fingerprint,
}
assert await cr_cat_wallet_1.match_hinted_coin(next(c for c in tx.additions if c.amount == 90), wallet_1_ph)
pending_tx = await client_1.get_transactions(
cr_cat_wallet_1.id(),
0,
Expand Down

0 comments on commit c9af97b

Please sign in to comment.