mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +02:00
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.
This commit is contained in:
@@ -115,7 +115,7 @@ class BIP65Test(BitcoinTestFramework):
|
||||
# create one invalid tx per CLTV failure reason (5 in total) and collect them
|
||||
invalid_cltv_txs = []
|
||||
for i in range(5):
|
||||
spendtx = wallet.create_self_transfer(from_node=self.nodes[0])['tx']
|
||||
spendtx = wallet.create_self_transfer()['tx']
|
||||
cltv_invalidate(spendtx, i)
|
||||
invalid_cltv_txs.append(spendtx)
|
||||
|
||||
@@ -146,7 +146,7 @@ class BIP65Test(BitcoinTestFramework):
|
||||
|
||||
# create and test one invalid tx per CLTV failure reason (5 in total)
|
||||
for i in range(5):
|
||||
spendtx = wallet.create_self_transfer(from_node=self.nodes[0])['tx']
|
||||
spendtx = wallet.create_self_transfer()['tx']
|
||||
cltv_invalidate(spendtx, i)
|
||||
|
||||
expected_cltv_reject_reason = [
|
||||
|
||||
Reference in New Issue
Block a user