Skip to content

Commit d20d96f

Browse files
tdb3Sjors
authored andcommitted
test: use REGTEST_N_BITS in feature_block
1 parent 7ddbed4 commit d20d96f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/functional/feature_block.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
create_tx_with_script,
1313
get_legacy_sigopcount_block,
1414
MAX_BLOCK_SIGOPS,
15+
REGTEST_N_BITS,
1516
)
1617
from test_framework.messages import (
1718
CBlock,
@@ -590,7 +591,7 @@ def run_test(self):
590591
b44 = CBlock()
591592
b44.nTime = self.tip.nTime + 1
592593
b44.hashPrevBlock = self.tip.sha256
593-
b44.nBits = 0x207fffff
594+
b44.nBits = REGTEST_N_BITS
594595
b44.vtx.append(coinbase)
595596
tx = self.create_and_sign_transaction(out[14], 1)
596597
b44.vtx.append(tx)
@@ -606,7 +607,7 @@ def run_test(self):
606607
b45 = CBlock()
607608
b45.nTime = self.tip.nTime + 1
608609
b45.hashPrevBlock = self.tip.sha256
609-
b45.nBits = 0x207fffff
610+
b45.nBits = REGTEST_N_BITS
610611
b45.vtx.append(non_coinbase)
611612
b45.hashMerkleRoot = b45.calc_merkle_root()
612613
b45.solve()
@@ -620,7 +621,7 @@ def run_test(self):
620621
b46 = CBlock()
621622
b46.nTime = b44.nTime + 1
622623
b46.hashPrevBlock = b44.sha256
623-
b46.nBits = 0x207fffff
624+
b46.nBits = REGTEST_N_BITS
624625
b46.vtx = []
625626
b46.hashMerkleRoot = 0
626627
b46.solve()

0 commit comments

Comments
 (0)