put chain params in pound defs
This commit is contained in:
parent
e08d765f11
commit
e190551cb2
1 changed files with 17 additions and 9 deletions
|
@ -18,6 +18,14 @@
|
|||
#include "chainparamsseeds.h"
|
||||
#include "arith_uint256.h"
|
||||
|
||||
#define GENESIS_MERKLE_ROOT "b8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc"
|
||||
|
||||
#define MAINNET_GENESIS_HASH "0000678ddce6b9b57e58fab6b89a1cf63519ffb4bc097debb1836577ead9a3be"
|
||||
#define MAINNET_GENESIS_NONCE 71748
|
||||
|
||||
#define REGTEST_GENESIS_HASH "6e3fcf1299d4ec5d79c3a4c91d624a4acf9e2e173d95a1a0504f677669687556"
|
||||
#define REGTEST_GENESIS_NONCE 1
|
||||
|
||||
bool CheckProofOfWork2(uint256 hash, unsigned int nBits, const Consensus::Params& params)
|
||||
{
|
||||
bool fNegative;
|
||||
|
@ -141,12 +149,12 @@ public:
|
|||
nDefaultPort = 9246;
|
||||
nPruneAfterHeight = 100000;
|
||||
|
||||
genesis = CreateGenesisBlock(1446058291, 71748, 0x1f00ffff, 1, 400000000 * COIN, consensus);
|
||||
genesis = CreateGenesisBlock(1446058291, MAINNET_GENESIS_NONCE, 0x1f00ffff, 1, 400000000 * COIN, consensus);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
//std::cout << "hex: " << consensus.hashGenesisBlock.GetHex() << std::endl;
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x0000678ddce6b9b57e58fab6b89a1cf63519ffb4bc097debb1836577ead9a3be"));
|
||||
//std::cout << "merkle root: " << genesis.hashMerkleRoot.GetHex() << std::endl;
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xb8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc"));
|
||||
assert(consensus.hashGenesisBlock == uint256S(MAINNET_GENESIS_HASH));
|
||||
assert(genesis.hashMerkleRoot == uint256S(GENESIS_MERKLE_ROOT));
|
||||
|
||||
vSeeds.clear();
|
||||
vFixedSeeds.clear();
|
||||
|
@ -215,12 +223,12 @@ public:
|
|||
nDefaultPort = 19246;
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
genesis = CreateGenesisBlock(1446058291, 71748, 0x1f00ffff, 1, 400000000 * COIN, consensus);
|
||||
genesis = CreateGenesisBlock(1446058291, MAINNET_GENESIS_NONCE, 0x1f00ffff, 1, 400000000 * COIN, consensus);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
//std::cout << "testnet genesis hash: " << genesis.GetHash().GetHex() << std::endl;
|
||||
//std::cout << "testnet merkle hash: " << genesis.hashMerkleRoot.GetHex() << std::endl;
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x0000678ddce6b9b57e58fab6b89a1cf63519ffb4bc097debb1836577ead9a3be"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xb8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc"));
|
||||
assert(consensus.hashGenesisBlock == uint256S(MAINNET_GENESIS_HASH));
|
||||
assert(genesis.hashMerkleRoot == uint256S(GENESIS_MERKLE_ROOT));
|
||||
|
||||
vFixedSeeds.clear();
|
||||
vSeeds.clear();
|
||||
|
@ -288,12 +296,12 @@ public:
|
|||
nDefaultPort = 29246;
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
genesis = CreateGenesisBlock(1446058291, 1, 0x207fffff, 1, 400000000 * COIN, consensus);
|
||||
genesis = CreateGenesisBlock(1446058291, REGTEST_GENESIS_NONCE, 0x207fffff, 1, 400000000 * COIN, consensus);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
//std::cout << "regtest genensis hash: " << genesis.GetHash().GetHex() << std::endl;
|
||||
//std::cout << "regtest hashmerkleroot: " << genesis.hashMerkleRoot.GetHex() << std::endl;
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x6e3fcf1299d4ec5d79c3a4c91d624a4acf9e2e173d95a1a0504f677669687556"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xb8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc"));
|
||||
assert(consensus.hashGenesisBlock == uint256S(REGTEST_GENESIS_HASH));
|
||||
assert(genesis.hashMerkleRoot == uint256S(GENESIS_MERKLE_ROOT));
|
||||
|
||||
vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
|
||||
vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds.
|
||||
|
|
Loading…
Reference in a new issue