Skip to content

Commit b184127

Browse files
committed
[doc][trivial] no retargeting in regtest mode
1 parent 8b262eb commit b184127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional/test_framework/blocktools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def create_block(hashprev, coinbase, nTime=None):
3232
else:
3333
block.nTime = nTime
3434
block.hashPrevBlock = hashprev
35-
block.nBits = 0x207fffff # Will break after a difficulty adjustment...
35+
block.nBits = 0x207fffff # difficulty retargeting is disabled in REGTEST chainparams
3636
block.vtx.append(coinbase)
3737
block.hashMerkleRoot = block.calc_merkle_root()
3838
block.calc_sha256()
@@ -86,7 +86,7 @@ def serialize_script_num(value):
8686
# otherwise an anyone-can-spend output.
8787
def create_coinbase(height, pubkey = None):
8888
coinbase = CTransaction()
89-
coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff),
89+
coinbase.vin.append(CTxIn(COutPoint(0, 0xffffffff),
9090
ser_string(serialize_script_num(height)), 0xffffffff))
9191
coinbaseoutput = CTxOut()
9292
coinbaseoutput.nValue = 50 * COIN

0 commit comments

Comments
 (0)