Skip to content

Commit

Permalink
Remove unused CConnman::ForEachQuorumMember
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Apr 9, 2019
1 parent 1ba8694 commit 5d94d6b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
14 changes: 0 additions & 14 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3247,20 +3247,6 @@ bool CConnman::ForNode(NodeId id, std::function<bool(const CNode* pnode)> cond,
return found != nullptr && cond(found) && func(found);
}

void CConnman::ForEachQuorumMember(Consensus::LLMQType llmqType, const uint256& quorumHash, std::function<bool(CNode* pnode)> func) const
{
LOCK2(cs_vNodes, cs_vPendingMasternodes);
auto it = masternodeQuorumNodes.find(std::make_pair(llmqType, quorumHash));
if (it == masternodeQuorumNodes.end()) {
return;
}
for (auto&& pnode : vNodes) {
if(it->second.count(pnode->addr)) {
func(pnode);
}
}
}

bool CConnman::IsMasternodeOrDisconnectRequested(const CService& addr) {
return ForNode(addr, AllNodes, [](CNode* pnode){
return pnode->fMasternode || pnode->fDisconnect;
Expand Down
2 changes: 0 additions & 2 deletions src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ class CConnman
ForEachNodeThen(FullyConnectedOnly, pre, post);
}

void ForEachQuorumMember(Consensus::LLMQType llmqType, const uint256& quorumHash, std::function<bool(CNode* pnode)> func) const;

std::vector<CNode*> CopyNodeVector(std::function<bool(const CNode* pnode)> cond);
std::vector<CNode*> CopyNodeVector();
void ReleaseNodeVector(const std::vector<CNode*>& vecNodes);
Expand Down

0 comments on commit 5d94d6b

Please sign in to comment.