mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 07:41:21 +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:
@ -102,7 +102,7 @@ class P2PBlocksOnly(BitcoinTestFramework):
|
||||
|
||||
def check_p2p_tx_violation(self):
|
||||
self.log.info('Check that txs from P2P are rejected and result in disconnect')
|
||||
spendtx = self.miniwallet.create_self_transfer(from_node=self.nodes[0])
|
||||
spendtx = self.miniwallet.create_self_transfer()
|
||||
|
||||
with self.nodes[0].assert_debug_log(['transaction sent in violation of protocol peer=0']):
|
||||
self.nodes[0].p2ps[0].send_message(msg_tx(spendtx['tx']))
|
||||
|
Reference in New Issue
Block a user