diff options
author | Gregory Sanders <gsanders87@gmail.com> | 2018-11-05 13:18:24 -0500 |
---|---|---|
committer | Gregory Sanders <gsanders87@gmail.com> | 2018-11-05 13:18:24 -0500 |
commit | 6c5355e43d7c68c9ba71bc3170b15a6cf96bb9b4 (patch) | |
tree | da5bb3b9c64764f5cfd189767c67f8ff991c0d43 | |
parent | 6b8d0a2164b30eab76e7bccb1ffb056a10fba406 (diff) |
example_test.py: fixup coinbase height argument, derive number clearly
-rwxr-xr-x | test/functional/example_test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 3f15367a75..be3544ee74 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -164,13 +164,13 @@ class ExampleTest(BitcoinTestFramework): self.tip = int(self.nodes[0].getbestblockhash(), 16) self.block_time = self.nodes[0].getblock(self.nodes[0].getbestblockhash())['time'] + 1 - height = 1 + height = self.nodes[0].getblockcount() for i in range(10): # Use the mininode and blocktools functionality to manually build a block # Calling the generate() rpc is easier, but this allows us to exactly # control the blocks and transactions. - block = create_block(self.tip, create_coinbase(height), self.block_time) + block = create_block(self.tip, create_coinbase(height+1), self.block_time) block.solve() block_message = msg_block(block) # Send message is used to send a P2P message to the node over our P2PInterface |