Skip to content

Commit

Permalink
Added Testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed Jun 2, 2014
1 parent a42963c commit 4426ef3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,7 @@ bool LoadBlockIndex(bool fAllowNew)
// CTxOut(empty)
//vMerkleTree: ea6fed5e2
// Genesis block
const char* pszTimestamp = "Jun 22, 2013 9:47am EDT. The United States has filed espionage charges against Edward Snowden";
const char* pszTimestamp = !fTestNet ? "Jun 22, 2013 9:47am EDT. The United States has filed espionage charges against Edward Snowden" : "Tranz Testnet";
CTransaction txNew;
txNew.nTime = nChainStartTime;
txNew.vin.resize(1);
Expand All @@ -2751,6 +2751,12 @@ bool LoadBlockIndex(bool fAllowNew)
block.nTime = 1371910069;
block.nBits = bnProofOfWorkLimit.GetCompact();
block.nNonce = 3858650;
if (fTestNet)
{
block.nTime = 1371910069;
block.nBits = bnProofOfWorkLimit.GetCompact();
block.nNonce = 3859086;
}

if (false && (block.GetHash() != hashGenesisBlock)) {

Expand All @@ -2776,9 +2782,12 @@ bool LoadBlockIndex(bool fAllowNew)
printf("block.nTime = %u \n", block.nTime);
printf("block.nNonce = %u \n", block.nNonce);

assert(block.hashMerkleRoot == uint256("0x42eda43959f2726e4ea033cab3af3c86d04cee4d5e736760387ba7dae87093ac"));
if (fTestNet)
assert(block.hashMerkleRoot == uint256("0x25756655bce43a9b72363c06979768cafba833a10de2e754fbef715a217ed241"));
else
assert(block.hashMerkleRoot == uint256("0x42eda43959f2726e4ea033cab3af3c86d04cee4d5e736760387ba7dae87093ac"));

assert(block.GetHash() == hashGenesisBlock);
assert(block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet));


// Start new block file
Expand Down

0 comments on commit 4426ef3

Please sign in to comment.