From 665ecebf3694dcf85b4827b1126e71332b2571fd Mon Sep 17 00:00:00 2001 From: Geoff Walmsley Date: Wed, 18 Oct 2023 18:46:57 +1300 Subject: [PATCH] update chia_blockchain and fix sign_coin_spends params --- cdv/test/__init__.py | 8 ++++++++ setup.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cdv/test/__init__.py b/cdv/test/__init__.py index 5567fa5..99bf3a5 100644 --- a/cdv/test/__init__.py +++ b/cdv/test/__init__.py @@ -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]]: @@ -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( diff --git a/setup.py b/setup.py index d40254a..89564e0 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ "pytest-asyncio", "pytimeparse", "anyio", - "chia-blockchain==2.0.0", + "chia-blockchain==2.1.1", ] dev_dependencies = [