refactor: drop dependency miner on llmq::utils::IsV20Active

This commit is contained in:
Konstantin Akimov 2023-12-05 03:06:32 +07:00 committed by PastaPastaPasta
parent 5d4b16a783
commit db4379348c

View File

@ -135,7 +135,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
bool fDIP0003Active_context = DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_DIP0003);
bool fDIP0008Active_context = DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_DIP0008);
bool fV20Active_context = llmq::utils::IsV20Active(pindexPrev);
const bool fV20Active_context{DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_V20)};
pblock->nVersion = g_versionbitscache.ComputeBlockVersion(pindexPrev, chainparams.GetConsensus());
// Non-mainnet only: allow overriding block.nVersion with
@ -402,7 +402,7 @@ void BlockAssembler::addPackageTxs(int &nPackagesSelected, int &nDescendantsUpda
// This credit pool is used only to check withdrawal limits and to find
// duplicates of indexes. There's used `BlockSubsidy` equaled to 0
std::optional<CCreditPoolDiff> creditPoolDiff;
if (llmq::utils::IsV20Active(pindexPrev)) {
if (DeploymentActiveAfter(pindexPrev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_V20)) {
CCreditPool creditPool = creditPoolManager->GetCreditPool(pindexPrev, chainparams.GetConsensus());
creditPoolDiff.emplace(std::move(creditPool), pindexPrev, chainparams.GetConsensus(), 0);
}