Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Commit

Permalink
New genesis block
Browse files Browse the repository at this point in the history
  • Loading branch information
n-savchenko committed Jul 12, 2017
1 parent 8217eda commit f5ae8a9
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static CBlock CreateGenesisBlock(const CScript& genesisInputScript, const CScri
*/
static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
{
const char* pszTimestamp = "The Times 10/Jul/2017: Russia is causing mayhem in cyberspace";
const char* pszTimestamp = "The Times 12/Jul/2017: Paris will pull out stops to woo jobs";
const CScript genesisOutputScript = CScript() << ParseHex("04c075cf0d0efdf24000f3b864c4a2c9c8477a590d0006c07f4f2d1c793318710092daf3764073e9c27fc0f6cb620cd45139f5c614218e560d4ab22ac68a998c96") << OP_CHECKSIG;
return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
}
Expand Down Expand Up @@ -176,14 +176,17 @@ class CMainParams : public CChainParams {
nMaxTipAge = 24 * 60 * 60;
nPruneAfterHeight = 100000;

genesis = CreateGenesisBlock(1499705169, 252602136, 0x1d00ffff, 1, 50 * COIN);
genesis = CreateGenesisBlock(1499854173, 2170479636, 0x1d00ffff, 1, 50 * COIN);

// MineGenesisBlock(genesis, consensus, strNetworkID);

consensus.hashGenesisBlock = genesis.GetHash();
// TODO uncomment
assert(consensus.hashGenesisBlock == uint256S("0x000000009e7bf02897e37a5d28892df718b647515da3a98d328dc47130feb5e9"));
assert(genesis.hashMerkleRoot == uint256S("0x451bc8fa1ab6b08e6d352201c3928f65c8441367edc86561e96b2045ca260f4d"));

std::cout<<consensus.hashGenesisBlock.ToString().c_str()<<std::endl<<genesis.hashMerkleRoot.ToString().c_str()<<std::endl;

assert(consensus.hashGenesisBlock == uint256S("0x000000000f0dfaf954310a57ed8efb3011c54e5d6dbf96453e7bed26e0f001d9"));
assert(genesis.hashMerkleRoot == uint256S("0x3c8ee463b1450eba7aeb1dec0053fefc2c8add817f0571e81342c69a877e8589"));

// BITCOINUNLIMITED START
// vSeeds.push_back(CDNSSeedData("seed.ensocoin.org", "seed.ensocoin.org"));
Expand All @@ -209,8 +212,8 @@ class CMainParams : public CChainParams {

checkpointData = (CCheckpointData) {
boost::assign::map_list_of
( 0, uint256S("0x000000009e7bf02897e37a5d28892df718b647515da3a98d328dc47130feb5e9")),
1499705169, // * UNIX timestamp of last checkpoint block
( 0, uint256S("0x000000000f0dfaf954310a57ed8efb3011c54e5d6dbf96453e7bed26e0f001d9")),
1499854173, // * UNIX timestamp of last checkpoint block
0, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
0 // * estimated number of transactions per day after checkpoint
Expand Down Expand Up @@ -336,13 +339,13 @@ class CTestNetParams : public CChainParams {
nPruneAfterHeight = 1000;

// args: nTime, nNonce, nBits, nVersion, genesisReward
genesis = CreateGenesisBlock(1499705178, 764180855, 0x1d00ffff, 1, 50 * COIN);
genesis = CreateGenesisBlock(1499855593, 1841855405, 0x1d00ffff, 1, 50 * COIN);

// MineGenesisBlock(genesis, consensus, strNetworkID);

consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x000000001a4fd32ca119bb3acfc2c02478a16f799ef51828adc620ddefffe151"));
assert(genesis.hashMerkleRoot == uint256S("0x451bc8fa1ab6b08e6d352201c3928f65c8441367edc86561e96b2045ca260f4d"));
assert(consensus.hashGenesisBlock == uint256S("0x00000000874983fec6c4f74f8afbd36b453879a38410938684773a7630146709"));
assert(genesis.hashMerkleRoot == uint256S("0x3c8ee463b1450eba7aeb1dec0053fefc2c8add817f0571e81342c69a877e8589"));

vFixedSeeds.clear();
vSeeds.clear();
Expand Down Expand Up @@ -371,8 +374,8 @@ class CTestNetParams : public CChainParams {

checkpointData = (CCheckpointData) {
boost::assign::map_list_of
( 0, uint256S("0x000000001a4fd32ca119bb3acfc2c02478a16f799ef51828adc620ddefffe151")),
1499705178,
( 0, uint256S("0x00000000874983fec6c4f74f8afbd36b453879a38410938684773a7630146709")),
1499855593,
0,
0
};
Expand Down

0 comments on commit f5ae8a9

Please sign in to comment.