Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions src/llmq/quorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,13 +731,13 @@ void CQuorumManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, C
CQuorumDataRequest request;
vRecv >> request;

CQuorumDataRequestKey key;
key.proRegTx = pfrom.GetVerifiedProRegTxHash();
key.flag = true;
key.quorumHash = request.GetQuorumHash();
key.llmqType = request.GetLLMQType();
{
LOCK2(cs_main, cs_data_requests);
CQuorumDataRequestKey key;
key.proRegTx = pfrom.GetVerifiedProRegTxHash();
key.flag = true;
key.quorumHash = request.GetQuorumHash();
key.llmqType = request.GetLLMQType();
auto it = mapQuorumDataRequests.find(key);
if (it == mapQuorumDataRequests.end()) {
errorHandler("Not requested");
Expand All @@ -751,7 +751,6 @@ void CQuorumManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, C
errorHandler("Not like requested");
return;
}
it->second.SetProcessed();
}

if (request.GetError() != CQuorumDataRequest::Errors::NONE) {
Expand Down Expand Up @@ -816,6 +815,14 @@ void CQuorumManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, C
}
}
pQuorum->WriteContributions(m_evoDb);
{
LOCK2(cs_main, cs_data_requests);
auto it = mapQuorumDataRequests.find(key);
if (it != mapQuorumDataRequests.end()) {
it->second.SetProcessed();
}
}

return;
}
}
Expand Down