[rpc] mining: Omit uninitialized currentblockweight, currentblocktx

This commit is contained in:
MarcoFalke
2019-02-11 11:59:34 -05:00
parent ad039aa0d3
commit fa178a6385
7 changed files with 62 additions and 39 deletions

View File

@ -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()