aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index cf4d8a134c..2b1892c121 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -57,7 +57,7 @@ class PSBTTest(BitcoinTestFramework):
online_addr = w2.getnewaddress(address_type="p2sh-segwit")
wonline.importaddress(offline_addr, "", False)
mining_node.sendtoaddress(address=offline_addr, amount=1.0)
- mining_node.generate(nblocks=1)
+ self.generate(mining_node, nblocks=1)
self.sync_blocks([mining_node, online_node])
# Construct an unsigned PSBT on the online node (who doesn't know the output is Segwit, so will include a non-witness UTXO)
@@ -72,7 +72,7 @@ class PSBTTest(BitcoinTestFramework):
# Make sure we can mine the resulting transaction
txid = mining_node.sendrawtransaction(mining_node.finalizepsbt(signed_psbt)["hex"])
- mining_node.generate(1)
+ self.generate(mining_node, 1)
self.sync_blocks([mining_node, online_node])
assert_equal(online_node.gettxout(txid,0)["confirmations"], 1)
@@ -148,7 +148,7 @@ class PSBTTest(BitcoinTestFramework):
rawtx = self.nodes[0].fundrawtransaction(rawtx, {"changePosition":3})
signed_tx = self.nodes[0].signrawtransactionwithwallet(rawtx['hex'])['hex']
txid = self.nodes[0].sendrawtransaction(signed_tx)
- self.nodes[0].generate(6)
+ self.generate(self.nodes[0], 6)
self.sync_all()
# Find the output pos
@@ -307,7 +307,7 @@ class PSBTTest(BitcoinTestFramework):
node2_addr = self.nodes[2].getnewaddress()
txid1 = self.nodes[0].sendtoaddress(node1_addr, 13)
txid2 = self.nodes[0].sendtoaddress(node2_addr, 13)
- blockhash = self.nodes[0].generate(6)[0]
+ blockhash = self.generate(self.nodes[0], 6)[0]
self.sync_all()
vout1 = find_output(self.nodes[1], txid1, 13, blockhash=blockhash)
vout2 = find_output(self.nodes[2], txid2, 13, blockhash=blockhash)
@@ -335,7 +335,7 @@ class PSBTTest(BitcoinTestFramework):
combined = self.nodes[0].combinepsbt([psbt1, psbt2])
finalized = self.nodes[0].finalizepsbt(combined)['hex']
self.nodes[0].sendrawtransaction(finalized)
- self.nodes[0].generate(6)
+ self.generate(self.nodes[0], 6)
self.sync_all()
# Test additional args in walletcreatepsbt
@@ -530,7 +530,7 @@ class PSBTTest(BitcoinTestFramework):
addr4 = self.nodes[1].getnewaddress("", "p2sh-segwit")
txid4 = self.nodes[0].sendtoaddress(addr4, 5)
vout4 = find_output(self.nodes[0], txid4, 5)
- self.nodes[0].generate(6)
+ self.generate(self.nodes[0], 6)
self.sync_all()
psbt2 = self.nodes[1].createpsbt([{"txid":txid4, "vout":vout4}], {self.nodes[0].getnewaddress():Decimal('4.999')})
psbt2 = self.nodes[1].walletprocesspsbt(psbt2)['psbt']
@@ -554,7 +554,7 @@ class PSBTTest(BitcoinTestFramework):
addr = self.nodes[1].getnewaddress("", "p2sh-segwit")
txid = self.nodes[0].sendtoaddress(addr, 7)
addrinfo = self.nodes[1].getaddressinfo(addr)
- blockhash = self.nodes[0].generate(6)[0]
+ blockhash = self.generate(self.nodes[0], 6)[0]
self.sync_all()
vout = find_output(self.nodes[0], txid, 7, blockhash=blockhash)
psbt = self.nodes[1].createpsbt([{"txid":txid, "vout":vout}], {self.nodes[0].getnewaddress("", "p2sh-segwit"):Decimal('6.999')})