diff --git a/src/llmq/quorums_dkgsession.cpp b/src/llmq/quorums_dkgsession.cpp index afd2af55f2d3..56c6861415cc 100644 --- a/src/llmq/quorums_dkgsession.cpp +++ b/src/llmq/quorums_dkgsession.cpp @@ -51,8 +51,11 @@ static double GetSimulatedErrorRate(const std::string& type) return 0; } -static bool ShouldSimulateError(const std::string& type) +bool CDKGSession::ShouldSimulateError(const std::string& type) { + if (params.type != Consensus::LLMQType::LLMQ_TEST) { + return false; + } double rate = GetSimulatedErrorRate(type); return GetRandBool(rate); } diff --git a/src/llmq/quorums_dkgsession.h b/src/llmq/quorums_dkgsession.h index e0a647f07584..7c2863ff70ec 100644 --- a/src/llmq/quorums_dkgsession.h +++ b/src/llmq/quorums_dkgsession.h @@ -340,6 +340,9 @@ class CDKGSession public: CDKGMember* GetMember(const uint256& proTxHash) const; + +private: + bool ShouldSimulateError(const std::string& type); }; void SetSimulatedDKGErrorRate(const std::string& type, double rate);