@@ -16,7 +16,7 @@ using namespace std;
16
16
17
17
#include " chainparamsseeds.h"
18
18
19
- static CBlock CreateGenesisBlock (const char * pszTimestamp, CScript genesisOutputScript, uint32_t nTime= 1231006505 , uint32_t nNonce= 2083236893 , uint32_t nBits= 0x1d00ffff , int32_t nVersion= 1 , const CAmount& genesisReward= 50 * COIN )
19
+ static CBlock CreateGenesisBlock (const char * pszTimestamp, const CScript& genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
20
20
{
21
21
CMutableTransaction txNew;
22
22
txNew.nVersion = 1 ;
@@ -48,10 +48,10 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, CScript genesisOutput
48
48
* CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
49
49
* vMerkleTree: 4a5e1e
50
50
*/
51
- static CBlock CreateGenesisBlock (uint32_t nTime= 1231006505 , uint32_t nNonce= 2083236893 , uint32_t nBits= 0x1d00ffff , int32_t nVersion= 1 , const CAmount& genesisReward= 50 * COIN )
51
+ static CBlock CreateGenesisBlock (uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
52
52
{
53
53
const char * pszTimestamp = " The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" ;
54
- CScript genesisOutputScript = CScript () << ParseHex (" 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" ) << OP_CHECKSIG;
54
+ const CScript genesisOutputScript = CScript () << ParseHex (" 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" ) << OP_CHECKSIG;
55
55
return CreateGenesisBlock (pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
56
56
}
57
57
@@ -91,7 +91,7 @@ class CMainParams : public CChainParams {
91
91
nDefaultPort = 8333 ;
92
92
nPruneAfterHeight = 100000 ;
93
93
94
- genesis = CreateGenesisBlock ();
94
+ genesis = CreateGenesisBlock (1231006505 , 2083236893 , 0x1d00ffff , 1 , 50 * COIN );
95
95
consensus.hashGenesisBlock = genesis.GetHash ();
96
96
assert (consensus.hashGenesisBlock == uint256S (" 0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" ));
97
97
assert (genesis.hashMerkleRoot == uint256S (" 0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" ));
@@ -164,9 +164,10 @@ class CTestNetParams : public CChainParams {
164
164
nDefaultPort = 18333 ;
165
165
nPruneAfterHeight = 1000 ;
166
166
167
- genesis = CreateGenesisBlock (1296688602 , 414098458 );
167
+ genesis = CreateGenesisBlock (1296688602 , 414098458 , 0x1d00ffff , 1 , 50 * COIN );
168
168
consensus.hashGenesisBlock = genesis.GetHash ();
169
169
assert (consensus.hashGenesisBlock == uint256S (" 0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943" ));
170
+ assert (genesis.hashMerkleRoot == uint256S (" 0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" ));
170
171
171
172
vFixedSeeds.clear ();
172
173
vSeeds.clear ();
@@ -216,16 +217,19 @@ class CRegTestParams : public CChainParams {
216
217
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60 ; // two weeks
217
218
consensus.nPowTargetSpacing = 10 * 60 ;
218
219
consensus.fPowAllowMinDifficultyBlocks = true ;
220
+
219
221
pchMessageStart[0 ] = 0xfa ;
220
222
pchMessageStart[1 ] = 0xbf ;
221
223
pchMessageStart[2 ] = 0xb5 ;
222
224
pchMessageStart[3 ] = 0xda ;
223
- genesis = CreateGenesisBlock (1296688602 , 2 , 0x207fffff );
224
- consensus.hashGenesisBlock = genesis.GetHash ();
225
225
nDefaultPort = 18444 ;
226
- assert (consensus.hashGenesisBlock == uint256S (" 0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206" ));
227
226
nPruneAfterHeight = 1000 ;
228
227
228
+ genesis = CreateGenesisBlock (1296688602 , 2 , 0x207fffff , 1 , 50 * COIN);
229
+ consensus.hashGenesisBlock = genesis.GetHash ();
230
+ assert (consensus.hashGenesisBlock == uint256S (" 0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206" ));
231
+ assert (genesis.hashMerkleRoot == uint256S (" 0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" ));
232
+
229
233
vFixedSeeds.clear (); // ! Regtest mode doesn't have any fixed seeds.
230
234
vSeeds.clear (); // ! Regtest mode doesn't have any DNS seeds.
231
235
0 commit comments