mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
refactor: replace static private member method to static method
This commit is contained in:
parent
6e5d3f1d1f
commit
130b6d1e96
@ -578,6 +578,30 @@ PeerMsgRet CSigningManager::ProcessMessage(const CNode& pfrom, const std::string
|
||||
return {};
|
||||
}
|
||||
|
||||
static bool PreVerifyRecoveredSig(const CQuorumManager& quorum_manager, const CRecoveredSig& recoveredSig, bool& retBan)
|
||||
{
|
||||
retBan = false;
|
||||
|
||||
auto llmqType = recoveredSig.getLlmqType();
|
||||
if (!Params().GetLLMQ(llmqType).has_value()) {
|
||||
retBan = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
CQuorumCPtr quorum = quorum_manager.GetQuorum(llmqType, recoveredSig.getQuorumHash());
|
||||
|
||||
if (!quorum) {
|
||||
LogPrint(BCLog::LLMQ, "CSigningManager::%s -- quorum %s not found\n", __func__,
|
||||
recoveredSig.getQuorumHash().ToString());
|
||||
return false;
|
||||
}
|
||||
if (!IsQuorumActive(llmqType, quorum_manager, quorum->qc->quorumHash)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
PeerMsgRet CSigningManager::ProcessMessageRecoveredSig(const CNode& pfrom, const std::shared_ptr<const CRecoveredSig>& recoveredSig)
|
||||
{
|
||||
{
|
||||
@ -614,30 +638,6 @@ PeerMsgRet CSigningManager::ProcessMessageRecoveredSig(const CNode& pfrom, const
|
||||
return {};
|
||||
}
|
||||
|
||||
bool CSigningManager::PreVerifyRecoveredSig(const CQuorumManager& quorum_manager, const CRecoveredSig& recoveredSig, bool& retBan)
|
||||
{
|
||||
retBan = false;
|
||||
|
||||
auto llmqType = recoveredSig.getLlmqType();
|
||||
if (!Params().GetLLMQ(llmqType).has_value()) {
|
||||
retBan = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
CQuorumCPtr quorum = quorum_manager.GetQuorum(llmqType, recoveredSig.getQuorumHash());
|
||||
|
||||
if (!quorum) {
|
||||
LogPrint(BCLog::LLMQ, "CSigningManager::%s -- quorum %s not found\n", __func__,
|
||||
recoveredSig.getQuorumHash().ToString());
|
||||
return false;
|
||||
}
|
||||
if (!IsQuorumActive(llmqType, quorum_manager, quorum->qc->quorumHash)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSigningManager::CollectPendingRecoveredSigsToVerify(
|
||||
size_t maxUniqueSessions,
|
||||
std::unordered_map<NodeId, std::list<std::shared_ptr<const CRecoveredSig>>>& retSigShares,
|
||||
|
@ -201,7 +201,6 @@ public:
|
||||
|
||||
private:
|
||||
PeerMsgRet ProcessMessageRecoveredSig(const CNode& pfrom, const std::shared_ptr<const CRecoveredSig>& recoveredSig);
|
||||
static bool PreVerifyRecoveredSig(const CQuorumManager& quorum_manager, const CRecoveredSig& recoveredSig, bool& retBan);
|
||||
|
||||
void CollectPendingRecoveredSigsToVerify(size_t maxUniqueSessions,
|
||||
std::unordered_map<NodeId, std::list<std::shared_ptr<const CRecoveredSig>>>& retSigShares,
|
||||
|
Loading…
Reference in New Issue
Block a user