aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/blocktools.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-01-08 15:37:33 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2019-01-08 15:53:39 +0100
commitc6806ee8694e9c864a29ef260c87b9fed77de84f (patch)
treeca2982d45f735d6a4dda0d674b94eea31c0cd0a2 /test/functional/test_framework/blocktools.py
parent29a9f07743500322498592b62134d6fa3d0b1a99 (diff)
parentfab17e8272f5f70213f186809479ee7a75898b1d (diff)
Merge #15059: test: Add basic test for BIP34
fab17e8272f5f70213f186809479ee7a75898b1d test: Add basic test for BIP34 (MarcoFalke) Pull request description: BIP34 was disabled for testing, which explains why it had no test. Fix that by enabling it and adding a test. Tree-SHA512: 9cb5702d474117ce6420226eb93ee09d6fb5fc856fabc8b67abe56a088cd727674e0e5462000e1afa83b911374036f90abdbdde56a8c236a75572ed47e10a00f
Diffstat (limited to 'test/functional/test_framework/blocktools.py')
-rw-r--r--test/functional/test_framework/blocktools.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py
index 7679ea5398..6b47cae4c3 100644
--- a/test/functional/test_framework/blocktools.py
+++ b/test/functional/test_framework/blocktools.py
@@ -46,9 +46,10 @@ MAX_BLOCK_SIGOPS = 20000
# From BIP141
WITNESS_COMMITMENT_HEADER = b"\xaa\x21\xa9\xed"
-def create_block(hashprev, coinbase, ntime=None):
+def create_block(hashprev, coinbase, ntime=None, *, version=1):
"""Create a block (with regtest difficulty)."""
block = CBlock()
+ block.nVersion = version
if ntime is None:
import time
block.nTime = int(time.time() + 600)