Skip to content

Commit

Permalink
Reset Block
Browse files Browse the repository at this point in the history
  • Loading branch information
DataSaverCoin committed May 11, 2018
1 parent 90a95ff commit e674888
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Checkpoints
// + Contains no strange transactions
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, uint256("0x2e7246d49a1b87fb561c7f8754d88cdf8fe69b13b49f99caa7a251504048172d"))
( 0, uint256("0xf733b0a36e67e7e9d9661390d78340d69064cb8da6823ff40bc76c2ae45a4d80"))
;
static const CCheckpointData data = {
&mapCheckpoints,
Expand All @@ -48,7 +48,7 @@ namespace Checkpoints

static MapCheckpoints mapCheckpointsTestnet =
boost::assign::map_list_of
( 0, uint256("0x2e7246d49a1b87fb561c7f8754d88cdf8fe69b13b49f99caa7a251504048172d"))
( 0, uint256("0xf733b0a36e67e7e9d9661390d78340d69064cb8da6823ff40bc76c2ae45a4d80"))
;
static const CCheckpointData dataTestnet = {
&mapCheckpointsTestnet,
Expand Down
24 changes: 12 additions & 12 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CTxMemPool mempool;
unsigned int nTransactionsUpdated = 0;

map<uint256, CBlockIndex*> mapBlockIndex;
uint256 hashGenesisBlock("0x2e7246d49a1b87fb561c7f8754d88cdf8fe69b13b49f99caa7a251504048172d");
uint256 hashGenesisBlock("0xf733b0a36e67e7e9d9661390d78340d69064cb8da6823ff40bc76c2ae45a4d80");
static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // Datasavercoin: starting difficulty is 1 / 2^12
CBlockIndex* pindexGenesisBlock = NULL;
int nBestHeight = -1;
Expand Down Expand Up @@ -1090,7 +1090,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees)
int64 nSubsidy = 500 * COIN;

if(nHeight ==2){
nSubsidy = 5000000 * COIN;
nSubsidy = 25000000 * COIN;
}else if(nHeight < 5000) {
nSubsidy = 500 * COIN;
}else if(nHeight < 10000){
Expand Down Expand Up @@ -2750,11 +2750,11 @@ bool LoadBlockIndex()
{
if (fTestNet)
{
pchMessageStart[0] = 0xe3;
pchMessageStart[1] = 0xa2;
pchMessageStart[0] = 0xe7;
pchMessageStart[1] = 0xa8;
pchMessageStart[2] = 0xb7;
pchMessageStart[3] = 0xdc;
hashGenesisBlock = uint256("0x2e7246d49a1b87fb561c7f8754d88cdf8fe69b13b49f99caa7a251504048172d");
hashGenesisBlock = uint256("0xf733b0a36e67e7e9d9661390d78340d69064cb8da6823ff40bc76c2ae45a4d80");
}

//
Expand Down Expand Up @@ -2787,34 +2787,34 @@ bool InitBlockIndex() {
// vMerkleTree: 97ddfbbae6

// Genesis block
const char* pszTimestamp = "This Coin was created on 4/23/2018 Bitcoin price is 8900$ today";
const char* pszTimestamp = "This Coin was created on 5/11/2018 Bitcoin price is 8900$ today";
CTransaction txNew;
txNew.vin.resize(1);
txNew.vout.resize(1);
txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
txNew.vout[0].nValue = 50 * COIN;
txNew.vout[0].scriptPubKey = CScript() << ParseHex("723084710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG;
txNew.vout[0].scriptPubKey = CScript() << ParseHex("723184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG;
CBlock block;
block.vtx.push_back(txNew);
block.hashPrevBlock = 0;
block.hashMerkleRoot = block.BuildMerkleTree();
block.nVersion = 1;
block.nTime = 1524502382;
block.nTime = 1526009824;
block.nBits = 0x1e0ffff0;
block.nNonce = 282487;
block.nNonce = 62770;

if (fTestNet)
{
block.nTime = 1524502382;
block.nNonce = 282487;
block.nTime = 1526009824;
block.nNonce = 62770;
}

//// debug print
uint256 hash = block.GetHash();
printf("%s\n", hash.ToString().c_str());
printf("%s\n", hashGenesisBlock.ToString().c_str());
printf("%s\n", block.hashMerkleRoot.ToString().c_str());
assert(block.hashMerkleRoot == uint256("0xdbab555d232b7f2eef5d85187fd37761b8a2902f492dd20239d7c3fae7dbb987"));
assert(block.hashMerkleRoot == uint256("0xdec513fb8018f9bdc702d5bdea5c9a9b4481e13d6ed57cbc7139002d8090a7d3"));
if (true && block.GetHash() != hashGenesisBlock)
{
printf("Searching for genesis block...\n");
Expand Down
6 changes: 4 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,12 +1174,14 @@ void MapPort(bool)
// The second name should resolve to a list of seed addresses.
static const char *strMainNetDNSSeed[][2] = {
{"datasavercointools.com", "162.204.48.211"},
{"seed.datasaver.org", "162.243.43.239"},

{NULL, NULL}
};

static const char *strTestNetDNSSeed[][2] = {
{"datasavercointools.com", "testnet-seed.datasavercointools.com"},
{"xurious.com", "testnet-seed.ltc.xurious.com"},
{"datasavercointools.com", "162.204.48.211"},
{"seed.datasaver.org", "162.243.43.239"},
{"wemine-testnet.com", "dnsseed.wemine-testnet.com"},
{NULL, NULL}
};
Expand Down

0 comments on commit e674888

Please sign in to comment.