From 8402a8e954bc6d1d03be5d9bb2ff27621211052c Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 17 Dec 2018 18:28:45 +0800 Subject: [PATCH] fix --- src/miner.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 2de3816f6..9e63da568 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1579,7 +1579,7 @@ void static BitcoinMiner() LogPrintf("Block %d : PoS %d%% vs target %d%% \n",Mining_height,percPoS,(int32_t)ASSETCHAINS_STAKED); } } - bool breakLoop; + //bool breakLoop; while (true) { /*if ( KOMODO_INSYNC == 0 ) @@ -1590,7 +1590,7 @@ void static BitcoinMiner() KOMODO_INSYNC = Mining_height; sleep(3); }*/ - breakLoop = false; + bool breakLoop = false; komodo_longestchain(); // Hash state KOMODO_CHOSEN_ONE = 0; @@ -1716,7 +1716,8 @@ void static BitcoinMiner() std::lock_guard lock{m_cs}; return cancelSolver; }; - + if (breakLoop) + break; // TODO: factor this out into a function with the same API for each solver. if (solver == "tromp" ) { //&& notaryid >= 0 ) { // Create solver and initialize it. @@ -1821,8 +1822,6 @@ void static BitcoinMiner() } }*/ } - if (breakLoop) - break; } } catch (const boost::thread_interrupted&)