Implement a hard fork for extended/infinite claim expiration times #112
5 changed files with 171 additions and 517 deletions
|
@ -129,16 +129,12 @@ public:
|
|||
nMaxTipAge = 24 * 60 * 60;
|
||||
nPruneAfterHeight = 100000;
|
||||
|
||||
genesis = CreateGenesisBlock(1446058291, 71748, 0x1f00ffff, 1, 400000000 * COIN, consensus);
|
||||
genesis = CreateGenesisBlock(1446058291, 92744, 0x1f00ffff, 1, 350000000 * COIN, consensus);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
//std::cout << "hex: " << consensus.hashGenesisBlock.GetHex() << std::endl;
|
||||
//assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
|
||||
//assert(consensus.hashGenesisBlock == uint256S("0x00ef6ded2b610fc5e4f06d187d12136bd5fba7b932fa0b66bf353c7c1648ec9c"));
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x0000678ddce6b9b57e58fab6b89a1cf63519ffb4bc097debb1836577ead9a3be"));
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x00005fa7f9e8fece6b2dfbeb0001b5b20f42f7fe49197fbbd170370f58d4c7d7"));
|
||||
//std::cout << "merkle root: " << genesis.hashMerkleRoot.GetHex() << std::endl;
|
||||
//assert(genesis.hashMerkleRoot == uint256("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));
|
||||
//assert(genesis.hashMerkleRoot == uint256S("0xa7d51d407092059a2beeffab22e65d6176cfb3c33b93515109480aa7c81c9141"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xb8211c82c3d15bcd78bba57005b86fed515149a53a425eb592c07af99fe559cc"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xba64cd17d1a1d03b1e5db2dc477822ba8f858443a38b0640d918b211ab22c51d"));
|
||||
|
||||
vSeeds.clear();
|
||||
vFixedSeeds.clear();
|
||||
|
@ -196,12 +192,12 @@ public:
|
|||
nMaxTipAge = 0x7fffffff;
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
genesis = CreateGenesisBlock(1446058291, 71748, 0x1f00ffff, 1, 400000000 * COIN, consensus);
|
||||
genesis = CreateGenesisBlock(1446058291, 92744, 0x1f00ffff, 1, 350000000 * 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("0x00005fa7f9e8fece6b2dfbeb0001b5b20f42f7fe49197fbbd170370f58d4c7d7"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xba64cd17d1a1d03b1e5db2dc477822ba8f858443a38b0640d918b211ab22c51d"));
|
||||
|
||||
vFixedSeeds.clear();
|
||||
vSeeds.clear();
|
||||
|
@ -243,7 +239,7 @@ class CRegTestParams : public CChainParams {
|
|||
public:
|
||||
CRegTestParams() {
|
||||
strNetworkID = "regtest";
|
||||
consensus.nSubsidyLevelInterval = 1 << 0;
|
||||
consensus.nSubsidyLevelInterval = 1 << 4;
|
||||
consensus.nMajorityEnforceBlockUpgrade = 750;
|
||||
consensus.nMajorityRejectBlockOutdated = 950;
|
||||
consensus.nMajorityWindow = 1000;
|
||||
|
@ -261,12 +257,12 @@ public:
|
|||
nDefaultPort = 29246;
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
genesis = CreateGenesisBlock(1446058291, 1, 0x207fffff, 1, 400000000 * COIN, consensus);
|
||||
genesis = CreateGenesisBlock(1446058291, 3, 0x207fffff, 1, 350000000 * 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("0x27cc4fec37b39831971deadcee7cf4725db7d693a0421fc1d9ca19b7420f5f27"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0xba64cd17d1a1d03b1e5db2dc477822ba8f858443a38b0640d918b211ab22c51d"));
|
||||
|
||||
vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
|
||||
vSeeds.clear(); //! Regtest mode doesn't have any DNS seeds.
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -91,17 +91,17 @@ struct {
|
|||
};*/
|
||||
|
||||
const unsigned int nonces[] = {
|
||||
42473, 132922, 17014, 33293, 25205, 745, 3501, 91831, 345165, 212732,
|
||||
7458, 27522, 18166, 10552, 135630, 54469, 1846, 80584, 12131, 5490,
|
||||
16008, 2151, 22470, 126425, 39085, 88559, 20079, 38991, 124860, 123602,
|
||||
68971, 98750, 62257, 127839, 22507, 8283, 50129, 123950, 102719, 180111,
|
||||
149088, 7175, 67345, 64223, 79645, 93448, 2962, 67297, 92578, 5208,
|
||||
111709, 77651, 196939, 18915, 115928, 15329, 52016, 19224, 43787, 38019,
|
||||
5584, 28397, 13333, 3934, 153943, 15534, 3792, 26791, 13480, 34165,
|
||||
33841, 22960, 2934, 21914, 121194, 4859, 31253, 221893, 38217, 38269,
|
||||
70801, 1634, 38357, 233028, 37013, 19370, 38351, 156457, 17848, 8185,
|
||||
107332, 20137, 47262, 101528, 22313, 54730, 1167, 202357, 134755, 34502,
|
||||
46143, 56776, 20297, 57361, 160230, 45089, 39421, 66186, 20829, 4318,
|
||||
1702, 4426, 44803, 21, 88869, 40139, 16382, 13525, 114648, 1190,
|
||||
194459, 110761, 23732, 7293, 171766, 61663, 11548, 120419, 55377, 16735,
|
||||
22878, 134905, 212010, 386284, 64559, 40003, 74327, 94247, 285391, 23496,
|
||||
15196, 72827, 7657, 54628, 128507, 85977, 110355, 7423, 2783, 10412,
|
||||
101705, 371190, 48999, 107613, 277276, 64945, 5153, 13299, 17459, 72684,
|
||||
44823, 35441, 26420, 86802, 167748, 146648, 55512, 3028, 7617, 39578,
|
||||
20422, 9399, 2315, 16152, 38659, 92561, 8113, 65207, 7377, 50940,
|
||||
7990, 5850, 26984, 52164, 178476, 149852, 47843, 158113, 41067, 19083,
|
||||
1327, 59064, 31805, 255902, 183334, 45615, 93019, 57065, 12571, 12702,
|
||||
139221, 5794, 33802, 1231, 23462, 6155, 7592, 25306, 112808, 1155,
|
||||
12771, 48467, 7670, 17533, 56443, 37742, 13555, 18969, 13887, 9033,
|
||||
};
|
||||
|
||||
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
|
||||
|
|
|
@ -140,6 +140,14 @@ TestChain100Setup::~TestChain100Setup()
|
|||
{
|
||||
}
|
||||
|
||||
RegTestingSetup::RegTestingSetup() : TestingSetup(CBaseChainParams::REGTEST)
|
||||
{
|
||||
}
|
||||
|
||||
RegTestingSetup::~RegTestingSetup()
|
||||
{
|
||||
}
|
||||
|
||||
void Shutdown(void* parg)
|
||||
{
|
||||
exit(0);
|
||||
|
|
|
@ -51,4 +51,9 @@ struct TestChain100Setup : public TestingSetup {
|
|||
CKey coinbaseKey; // private/public key needed to spend coinbase transactions
|
||||
};
|
||||
|
||||
struct RegTestingSetup: public TestingSetup {
|
||||
RegTestingSetup();
|
||||
~RegTestingSetup();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue