diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-01-11 15:39:57 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-01-11 16:22:33 +0100 |
commit | b24f6c6855bdd09bf445faeebe9d54c3d07a46d9 (patch) | |
tree | b7645a31b535818d56e7724dd39204a319535555 /test/functional/rpc_generateblock.py | |
parent | f30041c9143d0added18105c9f0c4ae3f340efbc (diff) | |
download | bitcoin-b24f6c6855bdd09bf445faeebe9d54c3d07a46d9.tar.xz |
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.
Diffstat (limited to 'test/functional/rpc_generateblock.py')
-rwxr-xr-x | test/functional/rpc_generateblock.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/rpc_generateblock.py b/test/functional/rpc_generateblock.py index 7aede0e947..7eeb745817 100755 --- a/test/functional/rpc_generateblock.py +++ b/test/functional/rpc_generateblock.py @@ -63,7 +63,7 @@ class GenerateBlockTest(BitcoinTestFramework): assert_equal(block['tx'][1], txid) self.log.info('Generate block with raw tx') - rawtx = miniwallet.create_self_transfer(from_node=node)['hex'] + rawtx = miniwallet.create_self_transfer()['hex'] hash = self.generateblock(node, address, [rawtx])['hash'] block = node.getblock(hash, 1) @@ -74,7 +74,7 @@ class GenerateBlockTest(BitcoinTestFramework): self.log.info('Fail to generate block with out of order txs') txid1 = miniwallet.send_self_transfer(from_node=node)['txid'] utxo1 = miniwallet.get_utxo(txid=txid1) - rawtx2 = miniwallet.create_self_transfer(from_node=node, utxo_to_spend=utxo1)['hex'] + rawtx2 = miniwallet.create_self_transfer(utxo_to_spend=utxo1)['hex'] assert_raises_rpc_error(-25, 'TestBlockValidity failed: bad-txns-inputs-missingorspent', self.generateblock, node, address, [rawtx2, txid1]) self.log.info('Fail to generate block with txid not in mempool') |