From: CryptoManiac Date: Fri, 2 Oct 2015 08:13:48 +0000 (-0700) Subject: Remove debugging code. X-Git-Tag: nvc-v0.5.5~68 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=144f5f66954f40fc37431916917a0f1d7d034533 Remove debugging code. --- diff --git a/src/kernel.cpp b/src/kernel.cpp index b95f4db..79d8e58 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -444,7 +444,7 @@ class ScanMidstateWorker public: ScanMidstateWorker() { } - ScanMidstateWorker(SHA256_CTX ctx, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair &SearchInterval) + ScanMidstateWorker(SHA256_CTX ctx, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd) { workerSolutions = vector >(); @@ -452,7 +452,8 @@ public: this->nBits = nBits; this->nInputTxTime = nInputTxTime; this->nValueIn = nValueIn; - this->SearchInterval = SearchInterval; + this->nIntervalBegin = nIntervalBegin; + this->nIntervalEnd = nIntervalEnd; } void Do() @@ -468,7 +469,7 @@ public: // Search forward in time from the given timestamp // Stopping search in case of shutting down - for (uint32_t nTimeTx=SearchInterval.first; nTimeTx SearchInterval; + uint32_t nIntervalBegin; + uint32_t nIntervalEnd; }; // Scan given midstate for solution @@ -526,13 +528,10 @@ bool ScanMidstateForward(SHA256_CTX &ctx, uint32_t nBits, uint32_t nInputTxTime, boost::thread_group group; for(int i = 0; i<4; i++) { - nBegin += (nPart * i); + uint32_t nIntervalBegin = nBegin + nPart * i; uint32_t nIntervalEnd = nBegin + nPart * (i + 1); - std::cout << nBegin << " " << nIntervalEnd << std::endl; - - std::pair interval(nBegin, nIntervalEnd); - workers[i] = ScanMidstateWorker(ctx, nBits, nInputTxTime, nValueIn, interval); + workers[i] = ScanMidstateWorker(ctx, nBits, nInputTxTime, nValueIn, nIntervalBegin, nIntervalEnd); boost::function workerFnc = boost::bind(&ScanMidstateWorker::Do, &workers[i]); group.create_thread(workerFnc);