From b24f6c6855bdd09bf445faeebe9d54c3d07a46d9 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Tue, 11 Jan 2022 15:39:57 +0100 Subject: test: MiniWallet: support default `from_node` for creating txs If no `from_node` parameter is passed explicitely to the `create_self_transfer` method, the test node passed in the course of creating the MiniWallet instance is used. This seems to be the main use-case in most of the current functional tests, i.e. in many instances the calls can be shortened. --- test/functional/feature_rbf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/functional/feature_rbf.py') diff --git a/test/functional/feature_rbf.py b/test/functional/feature_rbf.py index 5720ca4604..f0ed914461 100755 --- a/test/functional/feature_rbf.py +++ b/test/functional/feature_rbf.py @@ -115,7 +115,7 @@ class ReplaceByFeeTest(BitcoinTestFramework): """Simple doublespend""" # we use MiniWallet to create a transaction template with inputs correctly set, # and modify the output (amount, scriptPubKey) according to our needs - tx_template = self.wallet.create_self_transfer(from_node=self.nodes[0])['tx'] + tx_template = self.wallet.create_self_transfer()['tx'] tx1a = deepcopy(tx_template) tx1a.vout = [CTxOut(1 * COIN, DUMMY_P2WPKH_SCRIPT)] @@ -563,7 +563,6 @@ class ReplaceByFeeTest(BitcoinTestFramework): assert_equal(True, self.nodes[0].getmempoolentry(optin_parent_tx['txid'])['bip125-replaceable']) replacement_parent_tx = self.wallet.create_self_transfer( - from_node=self.nodes[0], utxo_to_spend=confirmed_utxo, sequence=BIP125_SEQUENCE_NUMBER, fee_rate=Decimal('0.02'), @@ -588,7 +587,6 @@ class ReplaceByFeeTest(BitcoinTestFramework): assert_equal(True, self.nodes[0].getmempoolentry(optout_child_tx['txid'])['bip125-replaceable']) replacement_child_tx = self.wallet.create_self_transfer( - from_node=self.nodes[0], utxo_to_spend=parent_utxo, sequence=SEQUENCE_FINAL, fee_rate=Decimal('0.02'), -- cgit v1.2.3