From 9144ea8c2bdbfe7a55a75c38fb035a16bdb268e7 Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Wed, 13 Jan 2016 11:28:24 -0700 Subject: [PATCH] Testnet modifications -- just take the parameters from regtest. Also, move loading ZC params to _before_ verification. --- src/chainparams.cpp | 14 ++++++++------ src/init.cpp | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index c71539397..96329b2da 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -140,6 +140,7 @@ public: consensus.nMajorityEnforceBlockUpgrade = 51; consensus.nMajorityRejectBlockOutdated = 75; consensus.nMajorityWindow = 100; + consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); consensus.fPowAllowMinDifficultyBlocks = true; pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; @@ -153,9 +154,10 @@ public: //! Modify the testnet genesis block so the timestamp is valid for a later start. genesis.nTime = 1296688602; - genesis.nNonce = 414098458; + genesis.nBits = 0x207fffff; + genesis.nNonce = 2; consensus.hashGenesisBlock = genesis.GetHash(); - assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943")); + assert(consensus.hashGenesisBlock == uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")); vFixedSeeds.clear(); vSeeds.clear(); @@ -181,10 +183,10 @@ public: checkpointData = (Checkpoints::CCheckpointData) { boost::assign::map_list_of - ( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")), - 1337966069, - 1488, - 300 + ( 0, consensus.hashGenesisBlock), + genesis.nTime, + 0, + 0 }; } diff --git a/src/init.cpp b/src/init.cpp index 22833f8df..43f99e813 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -638,6 +638,9 @@ static void ZC_LoadParams() */ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) { + // ********************************************************* Step 0: Load zcash params + ZC_LoadParams(); + // ********************************************************* Step 1: setup #ifdef _MSC_VER // Turn off Microsoft heap dump noise @@ -1265,9 +1268,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) mempool.ReadFeeEstimates(est_filein); fFeeEstimatesInitialized = true; - // ********************************************************* Step 7i: Load zcash params - ZC_LoadParams(); - // These must be disabled for now, they are buggy and we probably don't // want any of libsnark's profiling in production anyway. libsnark::inhibit_profiling_info = true;