refactor: drop public method llmq::utils::IsV19Active

This commit is contained in:
Konstantin Akimov 2023-12-05 02:55:08 +07:00 committed by PastaPastaPasta
parent 55abf7fa8d
commit 5d4b16a783
2 changed files with 5 additions and 7 deletions

View File

@ -34,6 +34,11 @@ static constexpr int TESTNET_LLMQ_25_67_ACTIVATION_HEIGHT = 847000;
*/
std::optional<std::pair<CBLSSignature, uint32_t>> GetNonNullCoinbaseChainlock(const CBlockIndex* pindex);
static bool IsV19Active(gsl::not_null<const CBlockIndex*> 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<const CBlockIndex*> pindex)
{
return pindex->nHeight + 1 >= Params().GetConsensus().V19Height;
}
bool IsV20Active(gsl::not_null<const CBlockIndex*> pindex)
{
return llmq_versionbitscache.State(pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_V20) == ThresholdState::ACTIVE;

View File

@ -78,8 +78,6 @@ std::vector<std::reference_wrapper<const Consensus::LLMQParams>> GetEnabledQuoru
// TODO options
bool IsQuorumRotationEnabled(const Consensus::LLMQParams& llmqParams, gsl::not_null<const CBlockIndex*> pindex);
// TODO deployments
bool IsV19Active(gsl::not_null<const CBlockIndex*> pindex);
// TODO deployments
bool IsV20Active(gsl::not_null<const CBlockIndex*> pindex);
/// Returns the state of `-llmq-data-recovery`