mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
test: [refactor] Fix E714 pycodestyle
This commit is contained in:
parent
f175a737c9
commit
444421db69
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2015-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2015-present 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."""
|
||||
|
@ -74,7 +74,7 @@ def create_block(hashprev=None, coinbase=None, ntime=None, *, version=None, tmpl
|
|||
block.nVersion = version or tmpl.get('version') or VERSIONBITS_LAST_OLD_BLOCK_VERSION
|
||||
block.nTime = ntime or tmpl.get('curtime') or int(time.time() + 600)
|
||||
block.hashPrevBlock = hashprev or int(tmpl['previousblockhash'], 0x10)
|
||||
if tmpl and not tmpl.get('bits') is None:
|
||||
if tmpl and tmpl.get('bits') is not None:
|
||||
block.nBits = struct.unpack('>I', bytes.fromhex(tmpl['bits']))[0]
|
||||
else:
|
||||
block.nBits = 0x207fffff # difficulty retargeting is disabled in REGTEST chainparams
|
||||
|
|
Loading…
Reference in a new issue