From 00a7120e90ed1afd30b245aa7d36fab9a0bc305b Mon Sep 17 00:00:00 2001 From: miketout Date: Thu, 4 Oct 2018 00:35:52 -0700 Subject: [PATCH] Cleanup, initialize stake for chainPower in pre-sapling path --- src/miner.cpp | 2 ++ src/pow.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 787075b6c..ccf2ea87f 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -824,6 +824,7 @@ int32_t waitForPeers(const CChainParams &chainparams) { bool fvNodesEmpty; { + boost::this_thread::interruption_point(); LOCK(cs_vNodes); fvNodesEmpty = vNodes.empty(); } @@ -833,6 +834,7 @@ int32_t waitForPeers(const CChainParams &chainparams) if (fvNodesEmpty) MilliSleep(1000 + rand() % 4000); { + boost::this_thread::interruption_point(); LOCK(cs_vNodes); fvNodesEmpty = vNodes.empty(); } diff --git a/src/pow.cpp b/src/pow.cpp index d3dc2f6aa..e043e542c 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -447,7 +447,7 @@ bool CheckProofOfWork(const CBlockHeader &blkHeader, uint8_t *pubkey33, int32_t CChainPower GetBlockProof(const CBlockIndex& block) { - arith_uint256 bnWorkTarget, bnStakeTarget = arith_uint256(); + arith_uint256 bnWorkTarget, bnStakeTarget = arith_uint256(0); bool fNegative; bool fOverflow;