From 5d14e8c6b30cb726856c9dfdb4a02e07e9922b40 Mon Sep 17 00:00:00 2001 From: Evan Duffield Date: Fri, 12 Dec 2014 15:19:02 -0700 Subject: [PATCH] Fixed testnet syncing issues --- src/chainparams.cpp | 10 +++++----- src/checkpoints.cpp | 8 ++++---- src/main.cpp | 3 +++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index fee54cfc66..edcfdada82 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -36,7 +36,7 @@ public: pchMessageStart[1] = 0x0c; pchMessageStart[2] = 0x6b; pchMessageStart[3] = 0xbd; - vAlertPubKey = ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9"); + vAlertPubKey = ParseHex("048240a8748a80a286b270ba126705ced4f2ce5a7847b3610ea3c06513150dade2a8512ed5ea86320824683fc0818f0ac019214973e677acd1244f6d0571fc5103"); nDefaultPort = 9999; nRPCPort = 9998; bnProofOfWorkLimit = CBigNum(~uint256(0) >> 20); // Darkcoin starting difficulty is 1 / 2^12 @@ -114,17 +114,17 @@ public: pchMessageStart[2] = 0xca; pchMessageStart[3] = 0xff; - vAlertPubKey = ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9"); + vAlertPubKey = ParseHex("04517d8a699cb43d3938d7b24faaff7cda448ca4ea267723ba614784de661949bf632d6304316b244646dea079735b9a6fc4af804efb4752075b9fe2245e14e412"); nDefaultPort = 19999; nRPCPort = 19998; strDataDir = "testnet4"; // Modify the testnet genesis block so the timestamp is valid for a later start. - genesis.nTime = 1413333337; - genesis.nNonce = 3229645; + genesis.nTime = 1390666206; + genesis.nNonce = 3861367235; hashGenesisBlock = genesis.GetHash(); - assert(hashGenesisBlock == uint256("0x00000008dfc658b2a9f79910d42e0595464e19cc332d98c0762330142f51ff73")); + assert(hashGenesisBlock == uint256("0x00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c")); vFixedSeeds.clear(); vSeeds.clear(); diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 1a88fe91fc..735dbdf77b 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -63,13 +63,13 @@ namespace Checkpoints static MapCheckpoints mapCheckpointsTestnet = boost::assign::map_list_of - ( 0, uint256("0x00000008dfc658b2a9f79910d42e0595464e19cc332d98c0762330142f51ff73")) + ( 200, uint256("0x00000823323bbce4a1fa953b73f88dc149f1ea91682d69d93eedd939bf902304")) ; static const CCheckpointData dataTestnet = { &mapCheckpointsTestnet, - 0, - 0, - 0 + 1405699509, + 20, + 300 }; static MapCheckpoints mapCheckpointsRegtest = diff --git a/src/main.cpp b/src/main.cpp index 9558ff8ada..3332ea1d57 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1594,6 +1594,9 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead if (pindexLast->nHeight + 1 >= 34140) retarget = DIFF_DGW; else if (pindexLast->nHeight + 1 >= 15200) retarget = DIFF_KGW; else retarget = DIFF_BTC; + } else { + if (pindexLast->nHeight + 1 >= 256) retarget = DIFF_DGW; + else retarget = DIFF_BTC; } // Default Bitcoin style retargeting