diff options
Diffstat (limited to 'test/functional/wallet_importdescriptors.py')
-rwxr-xr-x | test/functional/wallet_importdescriptors.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/functional/wallet_importdescriptors.py b/test/functional/wallet_importdescriptors.py index ad5ae111aa..1f1f92589c 100755 --- a/test/functional/wallet_importdescriptors.py +++ b/test/functional/wallet_importdescriptors.py @@ -24,7 +24,6 @@ from test_framework.descriptors import descsum_create from test_framework.util import ( assert_equal, assert_raises_rpc_error, - find_vout_for_address, ) from test_framework.wallet_util import ( get_generate_key, @@ -493,12 +492,10 @@ class ImportDescriptorsTest(BitcoinTestFramework): assert_equal(wmulti_pub.getwalletinfo()['keypoolsize'], 999) # generate some utxos for next tests - txid = w0.sendtoaddress(addr, 10) - vout = find_vout_for_address(self.nodes[0], txid, addr) + utxo = self.create_outpoints(w0, outputs=[{addr: 10}])[0] addr2 = wmulti_pub.getnewaddress('', 'bech32') - txid2 = w0.sendtoaddress(addr2, 10) - vout2 = find_vout_for_address(self.nodes[0], txid2, addr2) + utxo2 = self.create_outpoints(w0, outputs=[{addr2: 10}])[0] self.generate(self.nodes[0], 6) assert_equal(wmulti_pub.getbalance(), wmulti_priv.getbalance()) @@ -554,7 +551,7 @@ class ImportDescriptorsTest(BitcoinTestFramework): assert_equal(res[1]['success'], True) assert_equal(res[1]['warnings'][0], 'Not all private keys provided. Some wallet functionality may return unexpected errors') - rawtx = self.nodes[1].createrawtransaction([{'txid': txid, 'vout': vout}], {w0.getnewaddress(): 9.999}) + rawtx = self.nodes[1].createrawtransaction([utxo], {w0.getnewaddress(): 9.999}) tx_signed_1 = wmulti_priv1.signrawtransactionwithwallet(rawtx) assert_equal(tx_signed_1['complete'], False) tx_signed_2 = wmulti_priv2.signrawtransactionwithwallet(tx_signed_1['hex']) @@ -648,7 +645,7 @@ class ImportDescriptorsTest(BitcoinTestFramework): }]) assert_equal(res[0]['success'], True) - rawtx = self.nodes[1].createrawtransaction([{'txid': txid2, 'vout': vout2}], {w0.getnewaddress(): 9.999}) + rawtx = self.nodes[1].createrawtransaction([utxo2], {w0.getnewaddress(): 9.999}) tx = wmulti_priv3.signrawtransactionwithwallet(rawtx) assert_equal(tx['complete'], True) self.nodes[1].sendrawtransaction(tx['hex']) |