Skip to content

Commit

Permalink
update chia_blockchain and fix sign_coin_spends params
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffwalmsley committed Oct 18, 2023
1 parent 29f7be5 commit 665eceb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cdv/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ def pk_to_sk(self, pk: G1Element) -> PrivateKey:
assert str(pk) in self.pk_to_sk_dict
return self.pk_to_sk_dict[str(pk)]

def sk_for_puzzle_hash(self, puzzle_hash: bytes32) -> Optional[PrivateKey]:
"""
This method is a stub, required for the sign_coin_spends method in chia wallet.
"""
return None

def compute_combine_action(
self, amt: uint64, actions: List, usable_coins: Dict[bytes32, Union[Coin, CoinWrapper]]
) -> Optional[List[Coin]]:
Expand Down Expand Up @@ -540,8 +546,10 @@ async def spend_coin(self, coin: CoinWrapper, pushtx: bool = True, **kwargs) ->
spend_bundle: SpendBundle = await sign_coin_spends(
[solution_for_coin],
self.pk_to_sk,
self.sk_for_puzzle_hash,
DEFAULT_CONSTANTS.AGG_SIG_ME_ADDITIONAL_DATA,
DEFAULT_CONSTANTS.MAX_BLOCK_COST_CLVM,
[],
)
except ValueError:
spend_bundle = SpendBundle(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"pytest-asyncio",
"pytimeparse",
"anyio",
"chia-blockchain==2.0.0",
"chia-blockchain==2.1.1",
]

dev_dependencies = [
Expand Down

0 comments on commit 665eceb

Please sign in to comment.