From 68442e8dfe0854102c7e412c2f50a505dc1714bf Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Mon, 4 Dec 2023 15:03:51 +0700 Subject: [PATCH] chore: add TODO for llmq/utils.h refactoring --- src/llmq/utils.cpp | 1 + src/llmq/utils.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/llmq/utils.cpp b/src/llmq/utils.cpp index 60522a51b8..e40bc91fa5 100644 --- a/src/llmq/utils.cpp +++ b/src/llmq/utils.cpp @@ -25,6 +25,7 @@ #include #include +// TODO remove this const static constexpr int TESTNET_LLMQ_25_67_ACTIVATION_HEIGHT = 847000; /** diff --git a/src/llmq/utils.h b/src/llmq/utils.h index 188b917336..7093f25485 100644 --- a/src/llmq/utils.h +++ b/src/llmq/utils.h @@ -52,7 +52,9 @@ uint256 GetHashModifier(const Consensus::LLMQParams& llmqParams, gsl::not_null& validMembers, const CBLSPublicKey& pubKey, const uint256& vvecHash); uint256 BuildSignHash(Consensus::LLMQType llmqType, const uint256& quorumHash, const uint256& id, const uint256& msgHash); +// TODO options bool IsAllMembersConnectedEnabled(Consensus::LLMQType llmqType); +// TODO options bool IsQuorumPoseEnabled(Consensus::LLMQType llmqType); uint256 DeterministicOutboundConnection(const uint256& proTxHash1, const uint256& proTxHash2); std::set GetQuorumConnections(const Consensus::LLMQParams& llmqParams, gsl::not_null pQuorumBaseBlockIndex, const uint256& forMember, bool onlyOutbound); @@ -63,23 +65,36 @@ bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, gsl::not_n void AddQuorumProbeConnections(const Consensus::LLMQParams& llmqParams, gsl::not_null pQuorumBaseBlockIndex, CConnman& connman, const uint256& myProTxHash); bool IsQuorumActive(Consensus::LLMQType llmqType, const CQuorumManager& qman, const uint256& quorumHash); +// TODO options maybe not bool IsQuorumTypeEnabled(Consensus::LLMQType llmqType, const CQuorumManager& qman, gsl::not_null pindex); +// TODO options maybe not bool IsQuorumTypeEnabledInternal(Consensus::LLMQType llmqType, const CQuorumManager& qman, gsl::not_null pindex, std::optional optDIP0024IsActive, std::optional optHaveDIP0024Quorums); +// TODO options maybe not std::vector GetEnabledQuorumTypes(gsl::not_null pindex); +// TODO options maybe not std::vector> GetEnabledQuorumParams(gsl::not_null pindex); +// TODO options bool IsQuorumRotationEnabled(const Consensus::LLMQParams& llmqParams, gsl::not_null pindex); +// TODO deployments bool IsDIP0024Active(gsl::not_null pindex); +// TODO deployments bool IsV19Active(gsl::not_null pindex); +// TODO deployments bool IsV20Active(gsl::not_null pindex); +// TODO deployments bool IsMNRewardReallocationActive(gsl::not_null pindex); +// TODO deployments ThresholdState GetV20State(gsl::not_null pindex); +// TODO deployments int GetV20Since(gsl::not_null pindex); /// Returns the state of `-llmq-data-recovery` +// TODO options bool QuorumDataRecoveryEnabled(); +// TODO options /// Returns the state of `-watchquorums` bool IsWatchQuorumsEnabled();