diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-03-24 11:50:02 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-04-21 21:00:36 -0400 |
commit | 9f5ab670e7c8165f161ec44dbd95778c5515ece0 (patch) | |
tree | 38e295eb98386049cf451f909754e4f38937aa10 /test/functional/wallet_send.py | |
parent | 8a04a386f75d099f4b9864b0cdf7f26442b5801f (diff) | |
download | bitcoin-9f5ab670e7c8165f161ec44dbd95778c5515ece0.tar.xz |
tests: Use descriptor that requires both legacy and segwit
Diffstat (limited to 'test/functional/wallet_send.py')
-rwxr-xr-x | test/functional/wallet_send.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/wallet_send.py b/test/functional/wallet_send.py index 13cc7bad77..07baa0595e 100755 --- a/test/functional/wallet_send.py +++ b/test/functional/wallet_send.py @@ -492,8 +492,8 @@ class WalletSendTest(BitcoinTestFramework): self.nodes[1].createwallet("extfund") ext_fund = self.nodes[1].get_wallet_rpc("extfund") - # Make a weird but signable script. sh(pkh()) descriptor accomplishes this - desc = descsum_create("sh(pkh({}))".format(privkey)) + # Make a weird but signable script. sh(wsh(pkh())) descriptor accomplishes this + desc = descsum_create("sh(wsh(pkh({})))".format(privkey)) if self.options.descriptors: res = ext_fund.importdescriptors([{"desc": desc, "timestamp": "now"}]) else: @@ -511,7 +511,7 @@ class WalletSendTest(BitcoinTestFramework): self.test_send(from_wallet=ext_wallet, to_wallet=self.nodes[0], amount=15, inputs=[ext_utxo], add_inputs=True, psbt=True, include_watching=True, expect_error=(-4, "Insufficient funds")) # But funding should work when the solving data is provided - res = self.test_send(from_wallet=ext_wallet, to_wallet=self.nodes[0], amount=15, inputs=[ext_utxo], add_inputs=True, psbt=True, include_watching=True, solving_data={"pubkeys": [addr_info['pubkey']], "scripts": [addr_info["embedded"]["scriptPubKey"]]}) + res = self.test_send(from_wallet=ext_wallet, to_wallet=self.nodes[0], amount=15, inputs=[ext_utxo], add_inputs=True, psbt=True, include_watching=True, solving_data={"pubkeys": [addr_info['pubkey']], "scripts": [addr_info["embedded"]["scriptPubKey"], addr_info["embedded"]["embedded"]["scriptPubKey"]]}) signed = ext_wallet.walletprocesspsbt(res["psbt"]) signed = ext_fund.walletprocesspsbt(res["psbt"]) assert signed["complete"] |