aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_fundrawtransaction.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/rpc_fundrawtransaction.py')
-rwxr-xr-xtest/functional/rpc_fundrawtransaction.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/functional/rpc_fundrawtransaction.py b/test/functional/rpc_fundrawtransaction.py
index 0ce58efbcf..56312dc6e5 100755
--- a/test/functional/rpc_fundrawtransaction.py
+++ b/test/functional/rpc_fundrawtransaction.py
@@ -63,9 +63,9 @@ class RawTransactionsTest(BitcoinTestFramework):
# = 2 bytes * minRelayTxFeePerByte
self.fee_tolerance = 2 * self.min_relay_tx_fee / 1000
- self.nodes[2].generate(1)
+ self.generate(self.nodes[2], 1)
self.sync_all()
- self.nodes[0].generate(121)
+ self.generate(self.nodes[0], 121)
self.sync_all()
self.test_change_position()
@@ -126,7 +126,7 @@ class RawTransactionsTest(BitcoinTestFramework):
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 1.0)
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 5.0)
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
self.sync_all()
wwatch.unloadwallet()
@@ -500,7 +500,7 @@ class RawTransactionsTest(BitcoinTestFramework):
# Send 1.2 BTC to msig addr.
self.nodes[0].sendtoaddress(mSigObj, 1.2)
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
self.sync_all()
oldBalance = self.nodes[1].getbalance()
@@ -511,7 +511,7 @@ class RawTransactionsTest(BitcoinTestFramework):
signed_psbt = w2.walletprocesspsbt(funded_psbt)
final_psbt = w2.finalizepsbt(signed_psbt['psbt'])
self.nodes[2].sendrawtransaction(final_psbt['hex'])
- self.nodes[2].generate(1)
+ self.generate(self.nodes[2], 1)
self.sync_all()
# Make sure funds are received at node1.
@@ -572,7 +572,7 @@ class RawTransactionsTest(BitcoinTestFramework):
self.nodes[1].walletpassphrase("test", 600)
signedTx = self.nodes[1].signrawtransactionwithwallet(fundedTx['hex'])
self.nodes[1].sendrawtransaction(signedTx['hex'])
- self.nodes[1].generate(1)
+ self.generate(self.nodes[1], 1)
self.sync_all()
# Make sure funds are received at node1.
@@ -584,12 +584,12 @@ class RawTransactionsTest(BitcoinTestFramework):
# Empty node1, send some small coins from node0 to node1.
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), self.nodes[1].getbalance(), "", "", True)
- self.nodes[1].generate(1)
+ self.generate(self.nodes[1], 1)
self.sync_all()
for _ in range(20):
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.01)
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
self.sync_all()
# Fund a tx with ~20 small inputs.
@@ -612,12 +612,12 @@ class RawTransactionsTest(BitcoinTestFramework):
# Again, empty node1, send some small coins from node0 to node1.
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), self.nodes[1].getbalance(), "", "", True)
- self.nodes[1].generate(1)
+ self.generate(self.nodes[1], 1)
self.sync_all()
for _ in range(20):
self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.01)
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
self.sync_all()
# Fund a tx with ~20 small inputs.
@@ -629,7 +629,7 @@ class RawTransactionsTest(BitcoinTestFramework):
fundedTx = self.nodes[1].fundrawtransaction(rawtx)
fundedAndSignedTx = self.nodes[1].signrawtransactionwithwallet(fundedTx['hex'])
self.nodes[1].sendrawtransaction(fundedAndSignedTx['hex'])
- self.nodes[1].generate(1)
+ self.generate(self.nodes[1], 1)
self.sync_all()
assert_equal(oldBalance+Decimal('50.19000000'), self.nodes[0].getbalance()) #0.19+block reward
@@ -707,7 +707,7 @@ class RawTransactionsTest(BitcoinTestFramework):
signedtx = self.nodes[0].signrawtransactionwithwallet(signedtx["hex"])
assert signedtx["complete"]
self.nodes[0].sendrawtransaction(signedtx["hex"])
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
self.sync_all()
wwatch.unloadwallet()
@@ -933,7 +933,7 @@ class RawTransactionsTest(BitcoinTestFramework):
for _ in range(1500):
outputs[recipient.getnewaddress()] = 0.1
wallet.sendmany("", outputs)
- self.nodes[0].generate(10)
+ self.generate(self.nodes[0], 10)
assert_raises_rpc_error(-4, "Transaction too large", recipient.fundrawtransaction, rawtx)
def test_include_unsafe(self):
@@ -962,7 +962,7 @@ class RawTransactionsTest(BitcoinTestFramework):
wallet.sendrawtransaction(signedtx['hex'])
# And we can also use them once they're confirmed.
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
rawtx = wallet.createrawtransaction([], [{self.nodes[2].getnewaddress(): 3}])
fundedtx = wallet.fundrawtransaction(rawtx, {"include_unsafe": True})
tx_dec = wallet.decoderawtransaction(fundedtx['hex'])
@@ -993,7 +993,7 @@ class RawTransactionsTest(BitcoinTestFramework):
# than any single input available, and require more than 1 input. So we make 3 outputs
for i in range(0, 3):
funds.sendtoaddress(tester.getnewaddress(address_type="bech32"), 1)
- self.nodes[0].generate(1)
+ self.generate(self.nodes[0], 1)
# Create transactions in order to calculate fees for the target bounds that can trigger this bug
change_tx = tester.fundrawtransaction(tester.createrawtransaction([], [{funds.getnewaddress(): 1.5}]))