Browse Source

Fixed regtest. parseDouble still failed.

rx
Just Wonder 4 years ago
parent
commit
f6eb6a36ff
  1. 6
      src/chainparams.cpp
  2. 4
      src/cn_utils/crypto/rx-slow-hash.c

6
src/chainparams.cpp

@ -303,7 +303,7 @@ public: @@ -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 = 1200000; // RandomxX acticated on regtest.
consensus.RandomXHeight = 20; // RandomxX acticated on regtest.
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nPowTargetTimespan = 2.0 * 60; // Two minutes
consensus.nPowTargetSpacing = 2.0 * 60; // Two minutes
@ -334,9 +334,9 @@ public: @@ -334,9 +334,9 @@ public:
nDefaultPort = 19444;
nPruneAfterHeight = 1000;
genesis = CreateGenesisBlockTest(1296688602, 0, 0x207fffff, 1, 50 * COIN);
genesis = CreateGenesisBlockTest(1582959692, 0, 0x207fffff, 1, 50 * COIN);
consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x5d5ac209e9ebebf459c7258347cc5cfa65f85414d6615669ce5b9b20448a89cc"));
assert(consensus.hashGenesisBlock == uint256S("0x913ef11843ce0d4905bfdbd73c8e57bc9b35619dfada60474e64040b351b9941"));
assert(genesis.hashMerkleRoot == uint256S("0xb4db37fbc5c9ce5396b7d14dba94460cbcb4cf16e932b3cb6aece2244babf5b9"));
vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.

4
src/cn_utils/crypto/rx-slow-hash.c

@ -266,11 +266,11 @@ void rx_slow_hash(const uint64_t mainheight, const uint64_t seedheight, const ch @@ -266,11 +266,11 @@ void rx_slow_hash(const uint64_t mainheight, const uint64_t seedheight, const ch
if (cache == NULL) {
cache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES);
if (cache == NULL) {
printf("Couldn't use largePages for RandomX cache");
printf("Couldn't use largePages for RandomX cache\n");
cache = randomx_alloc_cache(flags);
}
if (cache == NULL)
local_abort("Couldn't allocate RandomX cache");
local_abort("Couldn't allocate RandomX cache\n");
}
}
if (rx_sp->rs_height != seedheight || rx_sp->rs_cache == NULL || memcmp(seedhash, rx_sp->rs_hash, sizeof(rx_sp->rs_hash))) {

Loading…
Cancel
Save