Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.cpp
Show First 20 Lines • Show All 521 Lines • ▼ Show 20 Lines | if (getProof(proofid)) { | ||||
m_unbroadcast_proofids.insert(proofid); | m_unbroadcast_proofids.insert(proofid); | ||||
} | } | ||||
} | } | ||||
void PeerManager::removeUnbroadcastProof(const ProofId &proofid) { | void PeerManager::removeUnbroadcastProof(const ProofId &proofid) { | ||||
m_unbroadcast_proofids.erase(proofid); | m_unbroadcast_proofids.erase(proofid); | ||||
} | } | ||||
std::vector<NodeId> PeerManager::nodesForPeer(const PeerId &peerId) const { | |||||
std::vector<NodeId> nodeIds; | |||||
for (auto [it, last] = nodes.get<next_request_time>().equal_range(peerId); | |||||
it != last; ++it) { | |||||
nodeIds.emplace_back(it->nodeid); | |||||
} | |||||
return nodeIds; | |||||
} | |||||
} // namespace avalanche | } // namespace avalanche |