Skip to content

Commit

Permalink
Merge bitcoin#14664: example_test.py: fixup coinbase height argument,…
Browse files Browse the repository at this point in the history
… derive number clearly

6c5355e example_test.py: fixup coinbase height argument, derive number clearly (Gregory Sanders)

Pull request description:

Tree-SHA512: 52b7eb73422feb1f730924c9f513c1c54e2b8b1bcf962b4df59fb6b0b86812ae8d0d336f8ef8edac9aab0e7722fd16ed21fd92fa58ab143d6f8efc5ac10e5b1f
  • Loading branch information
MarcoFalke authored and PastaPastaPasta committed Jul 1, 2021
1 parent 3d7e6a8 commit a0dd421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/functional/example_test.py
Expand Up @@ -166,13 +166,13 @@ def run_test(self):
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
Expand Down

0 comments on commit a0dd421

Please sign in to comment.