From d4cf78fe25eaf9437aef3d973ff749ef3a9f8911 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 8 Mar 2019 17:57:53 +0100 Subject: [PATCH] Add HasVotedOnId/GetVoteForId to CSigningManager These just pass through to CRecoveredSigsDb --- src/llmq/quorums_signing.cpp | 10 ++++++++++ src/llmq/quorums_signing.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/llmq/quorums_signing.cpp b/src/llmq/quorums_signing.cpp index 471a63dbd..3d2b228cc 100644 --- a/src/llmq/quorums_signing.cpp +++ b/src/llmq/quorums_signing.cpp @@ -686,6 +686,16 @@ bool CSigningManager::IsConflicting(Consensus::LLMQType llmqType, const uint256& return false; } +bool CSigningManager::HasVotedOnId(Consensus::LLMQType llmqType, const uint256& id) +{ + return db.HasVotedOnId(llmqType, id); +} + +bool CSigningManager::GetVoteForId(Consensus::LLMQType llmqType, const uint256& id, uint256& msgHashRet) +{ + return db.GetVoteForId(llmqType, id, msgHashRet); +} + CQuorumCPtr CSigningManager::SelectQuorumForSigning(Consensus::LLMQType llmqType, int signHeight, const uint256& selectionHash) { auto& llmqParams = Params().GetConsensus().llmqs.at(llmqType); diff --git a/src/llmq/quorums_signing.h b/src/llmq/quorums_signing.h index 952f5021e..7f6aa49c9 100644 --- a/src/llmq/quorums_signing.h +++ b/src/llmq/quorums_signing.h @@ -170,6 +170,9 @@ public: bool HasRecoveredSigForSession(const uint256& signHash); bool IsConflicting(Consensus::LLMQType llmqType, const uint256& id, const uint256& msgHash); + bool HasVotedOnId(Consensus::LLMQType llmqType, const uint256& id); + bool GetVoteForId(Consensus::LLMQType llmqType, const uint256& id, uint256& msgHashRet); + CQuorumCPtr SelectQuorumForSigning(Consensus::LLMQType llmqType, int signHeight, const uint256& selectionHash); // Verifies a recovered sig that was signed while the chain tip was at signedAtTip