aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_generate.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/rpc_generate.py')
-rwxr-xr-xtest/functional/rpc_generate.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/rpc_generate.py b/test/functional/rpc_generate.py
index 89b410e37e..20f62079fd 100755
--- a/test/functional/rpc_generate.py
+++ b/test/functional/rpc_generate.py
@@ -28,10 +28,14 @@ class RPCGenerateTest(BitcoinTestFramework):
def test_generateblock(self):
node = self.nodes[0]
miniwallet = MiniWallet(node)
- miniwallet.rescan_utxos()
- 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)