fix: remove unused cs_main lock from src/miner.cpp - it's not used by EHF logic anymore

This commit is contained in:
Konstantin Akimov 2023-12-05 14:48:03 +07:00 committed by PastaPastaPasta
parent f57859f777
commit 1b3237d147
2 changed files with 3 additions and 4 deletions

View File

@ -133,8 +133,8 @@ std::unique_ptr<CBlockTemplate> 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

View File

@ -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<uint8_t, int> GetMNHFSignalsStage(const CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
std::unordered_map<uint8_t, int> GetMNHFSignalsStage(const CBlockIndex* pindex);
std::string ToString() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
private: