diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-03-10 10:40:26 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-03-10 10:39:14 +0100 |
commit | fa18504d5767a40dc9827fb081633219bf251001 (patch) | |
tree | 773eb0b685bcbdd724886533eca5dbba27edc4a8 /test | |
parent | fab9a08e145dc5a1d9576bf062473f1095b56a16 (diff) | |
download | bitcoin-fa18504d5767a40dc9827fb081633219bf251001.tar.xz |
rpc: Add submit option to generateblock
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/rpc_generate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/rpc_generate.py b/test/functional/rpc_generate.py index 8948ccb48d..20f62079fd 100755 --- a/test/functional/rpc_generate.py +++ b/test/functional/rpc_generate.py @@ -29,8 +29,13 @@ class RPCGenerateTest(BitcoinTestFramework): node = self.nodes[0] miniwallet = MiniWallet(node) - self.log.info('Generate an empty block to address') + self.log.info('Mine an empty block to address and return the hex') address = miniwallet.get_address() + generated_block = self.generateblock(node, output=address, transactions=[], submit=False) + node.submitblock(hexdata=generated_block['hex']) + assert_equal(generated_block['hash'], node.getbestblockhash()) + + self.log.info('Generate an empty block to address') hash = self.generateblock(node, output=address, transactions=[])['hash'] block = node.getblock(blockhash=hash, verbose=2) assert_equal(len(block['tx']), 1) |