mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 19:21:28 +02:00
Merge #15059: test: Add basic test for BIP34
fab17e8272
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
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user