From 536480588ec1955111fe575df42ccb8d3711d756 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 23 Oct 2016 17:18:13 -0300 Subject: [PATCH] test --- src/miner.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index ecad2343b..cceec7f01 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -521,6 +521,7 @@ void static BitcoinMiner(CWallet *pwallet) // Search // int32_t notaryid; uint32_t savebits; int64_t nStart = GetTime(); + uint32_t starttime = (uint32_t)time(NULL); savebits = pblock->nBits; if ( komodo_chosennotary(¬aryid,pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 ) { @@ -568,10 +569,15 @@ void static BitcoinMiner(CWallet *pwallet) // Found a solution SetThreadPriority(THREAD_PRIORITY_NORMAL); LogPrintf("ZcashMiner:\n"); - LogPrintf("proof-of-work found \n hash: %s \ntarget: %s\n", pblock->GetHash().GetHex(), hashTarget.GetHex()); + LogPrintf("proof-of-work found \n hash: %s \ntarget: %s\n", pblock->GetHash().GetHex(), hashTarget.GetHex()); + if ( pblock->nBits == KOMODO_MINDIFF_NBITS ) + { + while ( time(NULL) < starttime+50 ) + fprintf(stderr,"%u: wait until %u\n",(uint32_t)time(NULL),starttime+50); + } if (ProcessBlockFound(pblock, *pwallet, reservekey)) { - // Ignore chain updates caused by us - std::lock_guard lock{m_cs}; + // Ignore chain updates caused by us + std::lock_guard lock{m_cs}; cancelSolver = false; } SetThreadPriority(THREAD_PRIORITY_LOWEST);