Rename CClaimTrieCache to CClaimTrieUpdateBuffer #156

Closed
kaykurokawa wants to merge 276 commits from cclaimtriecache_change into master
Showing only changes of commit e190551cb2 - Show all commits

View file

@ -18,6 +18,14 @@
#include "chainparamsseeds.h" #include "chainparamsseeds.h"
#include "arith_uint256.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 CheckProofOfWork2(uint256 hash, unsigned int nBits, const Consensus::Params& params)
{ {
bool fNegative; bool fNegative;
@ -141,12 +149,12 @@ public:
nDefaultPort = 9246; nDefaultPort = 9246;
nPruneAfterHeight = 100000; 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(); consensus.hashGenesisBlock = genesis.GetHash();
//std::cout << "hex: " << consensus.hashGenesisBlock.GetHex() << std::endl; //std::cout << "hex: " << consensus.hashGenesisBlock.GetHex() << std::endl;
assert(consensus.hashGenesisBlock == uint256S("0x0000678ddce6b9b57e58fab6b89a1cf63519ffb4bc097debb1836577ead9a3be"));
//std::cout << "merkle root: " << genesis.hashMerkleRoot.GetHex() << std::endl; //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(); vSeeds.clear();
vFixedSeeds.clear(); vFixedSeeds.clear();
@ -215,12 +223,12 @@ public:
nDefaultPort = 19246; nDefaultPort = 19246;
nPruneAfterHeight = 1000; 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(); consensus.hashGenesisBlock = genesis.GetHash();
//std::cout << "testnet genesis hash: " << genesis.GetHash().GetHex() << std::endl; //std::cout << "testnet genesis hash: " << genesis.GetHash().GetHex() << std::endl;
//std::cout << "testnet merkle hash: " << genesis.hashMerkleRoot.GetHex() << std::endl; //std::cout << "testnet merkle hash: " << genesis.hashMerkleRoot.GetHex() << std::endl;
assert(consensus.hashGenesisBlock == uint256S("0x0000678ddce6b9b57e58fab6b89a1cf63519ffb4bc097debb1836577ead9a3be")); assert(consensus.hashGenesisBlock == uint256S(MAINNET_GENESIS_HASH));
assert(genesis.hashMerkleRoot == uint256S("0xb8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc")); assert(genesis.hashMerkleRoot == uint256S(GENESIS_MERKLE_ROOT));
vFixedSeeds.clear(); vFixedSeeds.clear();
vSeeds.clear(); vSeeds.clear();
@ -288,12 +296,12 @@ public:
nDefaultPort = 29246; nDefaultPort = 29246;
nPruneAfterHeight = 1000; 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(); consensus.hashGenesisBlock = genesis.GetHash();
//std::cout << "regtest genensis hash: " << genesis.GetHash().GetHex() << std::endl; //std::cout << "regtest genensis hash: " << genesis.GetHash().GetHex() << std::endl;
//std::cout << "regtest hashmerkleroot: " << genesis.hashMerkleRoot.GetHex() << std::endl; //std::cout << "regtest hashmerkleroot: " << genesis.hashMerkleRoot.GetHex() << std::endl;
assert(consensus.hashGenesisBlock == uint256S("0x6e3fcf1299d4ec5d79c3a4c91d624a4acf9e2e173d95a1a0504f677669687556")); assert(consensus.hashGenesisBlock == uint256S(REGTEST_GENESIS_HASH));
assert(genesis.hashMerkleRoot == uint256S("0xb8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc")); assert(genesis.hashMerkleRoot == uint256S(GENESIS_MERKLE_ROOT));
vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds. vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds. vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds.