From 05661617a66f50b5a914aa713adb9c2289e55226 Mon Sep 17 00:00:00 2001 From: Holger Schinzel Date: Tue, 10 May 2016 09:41:40 +0200 Subject: [PATCH] Some houskeeping: - fixed testnet checkpoints - revert testnet mining patch --- src/chainparams.cpp | 13 ++++++------- src/miner.cpp | 29 ++++++++++++++--------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 3cf4201193..625bbe88fa 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -90,7 +90,7 @@ public: consensus.nPowTargetSpacing = 2.5 * 60; // Dash: 2.5 minutes consensus.fPowAllowMinDifficultyBlocks = false; consensus.fPowNoRetargeting = false; - /** + /** * The message start string is designed to be unlikely to occur in normal data. * The characters are rarely used upper ASCII, not valid as UTF-8, and produce * a large 32-bit integer with any alignment. @@ -244,12 +244,11 @@ public: strDarksendPoolDummyAddress = "y1EZuxhhNMAUofTBEeLqGE1bJrpC2TWRNp"; checkpointData = (CCheckpointData) { boost::assign::map_list_of - ( 261, uint256S("00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618")) - ( 77900, uint256S("00000007e5ec67e2a626c07b7d66673c3dd8df0aed5018ca984b99fba2b71024")) - ( 82313, uint256S("000000156a313af1d69fe855609175b276996235e8f4f7da41b10e4a7a750a19")), - 1405699509, - 201, - 500 + ( 261, uint256S("00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618")), + 1423410572, // * UNIX timestamp of last checkpoint block + 264, // * total number of transactions between genesis and last checkpoint + // (the tx=... number in the SetBestChain debug.log lines) + 500 // * estimated number of transactions per day after checkpoint }; } diff --git a/src/miner.cpp b/src/miner.cpp index b5c331cff7..58b7b1b244 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -408,21 +408,20 @@ void static BitcoinMiner(const CChainParams& chainparams) throw std::runtime_error("No coinbase script available (mining requires a wallet)"); while (true) { - // 12.1: testing note -- disabled for now - // if (chainparams.MiningRequiresPeers()) { - // // Busy-wait for the network to come online so we don't waste time mining - // // on an obsolete chain. In regtest mode we expect to fly solo. - // do { - // bool fvNodesEmpty; - // { - // LOCK(cs_vNodes); - // fvNodesEmpty = vNodes.empty(); - // } - // if (!fvNodesEmpty && !IsInitialBlockDownload()) - // break; - // MilliSleep(1000); - // } while (true); - // } + if (chainparams.MiningRequiresPeers()) { + // Busy-wait for the network to come online so we don't waste time mining + // on an obsolete chain. In regtest mode we expect to fly solo. + do { + bool fvNodesEmpty; + { + LOCK(cs_vNodes); + fvNodesEmpty = vNodes.empty(); + } + if (!fvNodesEmpty && !IsInitialBlockDownload()) + break; + MilliSleep(1000); + } while (true); + } //