aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/blocktools.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-02-11 11:59:34 -0500
committerMarcoFalke <falke.marco@gmail.com>2019-02-12 11:34:57 -0500
commitfa178a6385bf300499fb18940051fc4142fb5b6b (patch)
tree65c7d92724a4d7b91c06c4a6b9d0eaf3e37189ad /test/functional/test_framework/blocktools.py
parentad039aa0d3e8a831559434022b1da1de4d72a847 (diff)
downloadbitcoin-fa178a6385bf300499fb18940051fc4142fb5b6b.tar.xz
[rpc] mining: Omit uninitialized currentblockweight, currentblocktx
Diffstat (limited to 'test/functional/test_framework/blocktools.py')
-rw-r--r--test/functional/test_framework/blocktools.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py
index 6b47cae4c3..15f4502994 100644
--- a/test/functional/test_framework/blocktools.py
+++ b/test/functional/test_framework/blocktools.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2015-2018 The Bitcoin Core developers
+# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for manipulating blocks and transactions."""
@@ -43,9 +43,13 @@ from io import BytesIO
MAX_BLOCK_SIGOPS = 20000
+# Genesis block time (regtest)
+TIME_GENESIS_BLOCK = 1296688602
+
# From BIP141
WITNESS_COMMITMENT_HEADER = b"\xaa\x21\xa9\xed"
+
def create_block(hashprev, coinbase, ntime=None, *, version=1):
"""Create a block (with regtest difficulty)."""
block = CBlock()