From 5d4b16a78390b4f80583b8a59cb325fd9aefd688 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Tue, 5 Dec 2023 02:55:08 +0700 Subject: [PATCH] refactor: drop public method llmq::utils::IsV19Active --- src/llmq/utils.cpp | 10 +++++----- src/llmq/utils.h | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/llmq/utils.cpp b/src/llmq/utils.cpp index 9980efbfaf..058021af93 100644 --- a/src/llmq/utils.cpp +++ b/src/llmq/utils.cpp @@ -34,6 +34,11 @@ static constexpr int TESTNET_LLMQ_25_67_ACTIVATION_HEIGHT = 847000; */ std::optional> GetNonNullCoinbaseChainlock(const CBlockIndex* pindex); +static bool IsV19Active(gsl::not_null pindexPrev) +{ + return DeploymentActiveAfter(pindexPrev, Params().GetConsensus(), Consensus::DEPLOYMENT_V19); +} + namespace llmq { @@ -682,11 +687,6 @@ bool IsQuorumRotationEnabled(const Consensus::LLMQParams& llmqParams, gsl::not_n return DeploymentActiveAfter(pindex->GetAncestor(cycleQuorumBaseHeight - 1), Params().GetConsensus(), Consensus::DEPLOYMENT_DIP0024); } -bool IsV19Active(gsl::not_null pindex) -{ - return pindex->nHeight + 1 >= Params().GetConsensus().V19Height; -} - bool IsV20Active(gsl::not_null pindex) { return llmq_versionbitscache.State(pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_V20) == ThresholdState::ACTIVE; diff --git a/src/llmq/utils.h b/src/llmq/utils.h index 55c59b8b06..b0bcdc1ca4 100644 --- a/src/llmq/utils.h +++ b/src/llmq/utils.h @@ -78,8 +78,6 @@ std::vector> GetEnabledQuoru // TODO options bool IsQuorumRotationEnabled(const Consensus::LLMQParams& llmqParams, gsl::not_null pindex); // TODO deployments -bool IsV19Active(gsl::not_null pindex); -// TODO deployments bool IsV20Active(gsl::not_null pindex); /// Returns the state of `-llmq-data-recovery`