Skip to content

Commit ca4666c

Browse files
committed
Genesis
1 parent f99aca6 commit ca4666c

File tree

3 files changed

+42
-46
lines changed

3 files changed

+42
-46
lines changed

src/main.cpp

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ unsigned int nStakeMaxAge = 10000 * 10000; // stake max age disabled
4747
unsigned int nStakeTargetSpacing = 30; // 30 seconds POS block spacing
4848
unsigned int nProofOfWorkTargetSpacing = 150; // 30 seconds PoW block spacing
4949

50-
int64 nChainStartTime = 1412878964;
50+
int64 nChainStartTime = 1507042163;
5151
int nCoinbaseMaturity = 240;
5252
CBlockIndex* pindexGenesisBlock = NULL;
5353
int nBestHeight = -1;
@@ -2641,11 +2641,11 @@ bool LoadBlockIndex(bool fAllowNew)
26412641
// CTxOut(empty)
26422642
//vMerkleTree: ea6fed5e2
26432643
// Genesis block
2644-
const char* pszTimestamp = "Name: Dogecoin Dark"; //TODO: set to new article
2644+
const char* pszTimestamp = "10/03/2017 11:09 pm,What we know about the Las Vegas massacre, ABC news";
26452645
if(fTestNet)
26462646
pszTimestamp = "SHIELD TESTNET";
26472647
CTransaction txNew;
2648-
txNew.nTime = nChainStartTime; //TODO: set unix time
2648+
txNew.nTime = nChainStartTime;
26492649
if(fTestNet)
26502650
txNew.nTime = 1506956636;
26512651

@@ -2658,48 +2658,48 @@ bool LoadBlockIndex(bool fAllowNew)
26582658
block.hashPrevBlock = 0;
26592659
block.hashMerkleRoot = block.BuildMerkleTree();
26602660
block.nVersion = 1;
2661-
block.nTime = 1412878964;
2661+
block.nTime = 1507042163;
26622662
block.nBits = bnProofOfWorkLimit[ALGO_SCRYPT].GetCompact();
2663-
block.nNonce = 143191;
2663+
block.nNonce = 541768;
26642664

26652665
if(fTestNet)
26662666
{
26672667
block.nTime = 1506956636;
26682668
block.nNonce = 823;
26692669
}
26702670

2671-
{
2672-
// If genesis block hash does not match, then generate new genesis hash.
2673-
if (block.GetHash() != (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
2674-
{
2675-
printf("Searching for genesis block...\n");
2676-
// This will figure out a valid hash and Nonce if you're
2677-
// creating a different genesis block:
2678-
uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
2679-
uint256 thash;
2680-
while(true)
2681-
{
2682-
static char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
2683-
scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
2684-
if (thash <= hashTarget)
2685-
break;
2686-
if ((block.nNonce & 0xFFF) == 0)
2687-
{
2688-
printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
2689-
}
2690-
++block.nNonce;
2691-
if (block.nNonce == 0)
2692-
{
2693-
printf("NONCE WRAPPED, incrementing time\n");
2694-
++block.nTime;
2695-
}
2696-
}
2697-
printf("block.nTime = %u \n", block.nTime);
2698-
printf("block.nNonce = %u \n", block.nNonce);
2699-
printf("block.GetHash = %s\n", block.GetHash().ToString().c_str());
2700-
printf("block.hashMerkleRoot == %s\n", block.hashMerkleRoot.ToString().c_str());
2701-
}
2702-
}
2671+
// {
2672+
// // If genesis block hash does not match, then generate new genesis hash.
2673+
// if (block.GetHash() != (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
2674+
// {
2675+
// printf("Searching for genesis block...\n");
2676+
// // This will figure out a valid hash and Nonce if you're
2677+
// // creating a different genesis block:
2678+
// uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
2679+
// uint256 thash;
2680+
// while(true)
2681+
// {
2682+
// static char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
2683+
// scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
2684+
// if (thash <= hashTarget)
2685+
// break;
2686+
// if ((block.nNonce & 0xFFF) == 0)
2687+
// {
2688+
// printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
2689+
// }
2690+
// ++block.nNonce;
2691+
// if (block.nNonce == 0)
2692+
// {
2693+
// printf("NONCE WRAPPED, incrementing time\n");
2694+
// ++block.nTime;
2695+
// }
2696+
// }
2697+
// printf("block.nTime = %u \n", block.nTime);
2698+
// printf("block.nNonce = %u \n", block.nNonce);
2699+
// printf("block.GetHash = %s\n", block.GetHash().ToString().c_str());
2700+
// printf("block.hashMerkleRoot == %s\n", block.hashMerkleRoot.ToString().c_str());
2701+
// }
2702+
// }
27032703

27042704
//// debug print
27052705
block.print();
@@ -2712,7 +2712,7 @@ bool LoadBlockIndex(bool fAllowNew)
27122712
assert(block.hashMerkleRoot == uint256("0x8d032a5390720323084b8cff98a35f4486f59674a5b55a70fd865b21dedf5ba5"));
27132713
}
27142714
else {
2715-
assert(block.hashMerkleRoot == uint256("0x1c83275d9151711eec3aec35d829837cc3c2730b2bdfd00ec5e8e5dce675fd00"));
2715+
assert(block.hashMerkleRoot == uint256("0xa21cf5b56fccae008522949023462651426e505a4118d345f0a28ba97d82185a"));
27162716
}
27172717

27182718

src/main.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class CInv;
2828
class CRequestTracker;
2929
class CNode;
3030

31-
static const int MULTI_ALGO_SWITCH_BLOCK = 34000;
32-
static const unsigned int MAX_BLOCK_SIZE = 1000000;
31+
static const int MULTI_ALGO_SWITCH_BLOCK = 10000;
32+
static const unsigned int MAX_BLOCK_SIZE = 500000;
3333
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
3434
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
3535
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
@@ -51,7 +51,7 @@ static const int fHaveUPnP = true;
5151
static const int fHaveUPnP = false;
5252
#endif
5353

54-
static const uint256 hashGenesisBlockOfficial("0x00000fc6369246afaeb20cdb3b53200dc601d75bdfa1001463304cc790d77278");
54+
static const uint256 hashGenesisBlockOfficial("0x00000e9efbdc94741baec54e68fbc1d7cc3f8c08391a889f387b9ccec99d818d");
5555
static const uint256 hashGenesisBlockTestNet("0x000000194c2494e82753c35633887a0fa28bd4c96d9ac3c380c2e054d1539a43");
5656

5757
static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours

src/net.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,11 +1151,7 @@ void MapPort()
11511151
// The first name is used as information source for addrman.
11521152
// The second name should resolve to a list of seed addresses.
11531153
static const char *strDNSSeed[][2] = { //TODO: change
1154-
{"185.162.9.97", "104.131.144.82"},
1155-
{"192.241.187.222", "105.228.198.44"},
1156-
{"46.127.57.167", "98.5.123.15"},
1157-
{"81.147.68.236", "77.67.46.100"},
1158-
{"95.46.99.96", "138.201.91.159"},
1154+
{"188.226.178.216", "188.226.155.37"},
11591155
};
11601156

11611157
void ThreadDNSAddressSeed(void* parg)

0 commit comments

Comments
 (0)