diff --git a/src/miner.cpp b/src/miner.cpp index cdd0b038d6..90348da9cd 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -133,8 +133,8 @@ std::unique_ptr BlockAssembler::CreateNewBlock(const CScript& sc assert(pindexPrev != nullptr); nHeight = pindexPrev->nHeight + 1; - bool fDIP0003Active_context = DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_DIP0003); - bool fDIP0008Active_context = DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_DIP0008); + const bool fDIP0003Active_context{DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_DIP0003)}; + const bool fDIP0008Active_context{DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_DIP0008)}; const bool fV20Active_context{DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_V20)}; pblock->nVersion = g_versionbitscache.ComputeBlockVersion(pindexPrev, chainparams.GetConsensus()); @@ -396,7 +396,6 @@ void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, std::ve // transaction package to work on next. void BlockAssembler::addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated, const CBlockIndex* const pindexPrev) { - AssertLockHeld(cs_main); // for GetMNHFSignalsStage() AssertLockHeld(m_mempool.cs); // This credit pool is used only to check withdrawal limits and to find diff --git a/src/validation.h b/src/validation.h index 1695be3073..d73fdedc57 100644 --- a/src/validation.h +++ b/src/validation.h @@ -766,7 +766,7 @@ public: size_t max_mempool_size_bytes) EXCLUSIVE_LOCKS_REQUIRED(::cs_main); /** Return list of MN EHF signals for current Tip() */ - std::unordered_map GetMNHFSignalsStage(const CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(::cs_main); + std::unordered_map GetMNHFSignalsStage(const CBlockIndex* pindex); std::string ToString() EXCLUSIVE_LOCKS_REQUIRED(::cs_main); private: