diff --git a/src/chainparams.cpp b/src/chainparams.cpp index d37c13b70..21f2edb75 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -303,7 +303,7 @@ public: consensus.BIP34Hash = uint256(); consensus.BIP65Height = 1351; // BIP65 activated on regtest (Used in rpc activation tests) consensus.BIP66Height = 1251; // BIP66 activated on regtest (Used in rpc activation tests) - consensus.RandomXHeight = 20; // RandomxX acticated on regtest. + consensus.RandomXHeight = 2000000; // RandomX acticated on regtest. consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.nPowTargetTimespan = 2.0 * 60; // Two minutes consensus.nPowTargetSpacing = 2.0 * 60; // Two minutes diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index 3e4fdb7dd..baee536ee 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -627,6 +627,10 @@ class FullBlockTest(ComparisonTestFramework): b44.nBits = 0x207fffff b44.vtx.append(coinbase) b44.hashMerkleRoot = b44.calc_merkle_root() + b44.merkle_root = uint256_from_str(bytes.fromhex("3cf6c3b6da3f4058853ee70369ee43d473aca91ae8fc8f44a645beb21c392d80")) + b44.nNonce = height + b44.major_version = 10 # CN variant 4 + b44.timestamp = b44.nTime b44.solve() self.tip = b44 self.block_heights[b44.sha256] = height @@ -642,6 +646,10 @@ class FullBlockTest(ComparisonTestFramework): b45.nBits = 0x207fffff b45.vtx.append(non_coinbase) b45.hashMerkleRoot = b45.calc_merkle_root() + b45.merkle_root = uint256_from_str(bytes.fromhex("3cf6c3b6da3f4058853ee70369ee43d473aca91ae8fc8f44a645beb21c392d80")) + b45.nNonce = height + b45.major_version = 10 # CN variant 4 + b45.timestamp = b45.nTime b45.calc_sha256() b45.solve() self.block_heights[b45.sha256] = self.block_heights[self.tip.sha256]+1 @@ -658,6 +666,10 @@ class FullBlockTest(ComparisonTestFramework): b46.nBits = 0x207fffff b46.vtx = [] b46.hashMerkleRoot = 0 + b46.merkle_root = uint256_from_str(bytes.fromhex("3cf6c3b6da3f4058853ee70369ee43d473aca91ae8fc8f44a645beb21c392d80")) + b46.nNonce = height + b46.major_version = 10 # CN variant 4 + b46.timestamp = b45.nTime b46.solve() self.block_heights[b46.sha256] = self.block_heights[b44.sha256]+1 self.tip = b46 diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index e484e36ab..db822a781 100644 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -23,7 +23,7 @@ import socket import struct import time -import pycryptonight +import pycryptonight # pip3 install py-cryptonight from test_framework.siphash import siphash256 from test_framework.util import hex_str_to_bytes, bytes_to_hex_str diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 8d82f66d2..3eefd336a 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -330,7 +330,7 @@ class BitcoinTestFramework(): For backwared compatibility of the python scripts with previous versions of the cache, this helper function sets mocktime to Jan 1, 2014 + (201 * 10 * 60)""" - self.mocktime = 1388534400 + (201 * 10 * 60) + self.mocktime = 1582959692 + (201 * 10 * 60) def disable_mocktime(self): self.mocktime = 0