Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.h
Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | bool forPeer(const ProofId &proofid, Callable &&func) const { | ||||
return it != pview.end() && func(*it); | return it != pview.end() && func(*it); | ||||
} | } | ||||
template <typename Callable> void forEachPeer(Callable &&func) const { | template <typename Callable> void forEachPeer(Callable &&func) const { | ||||
for (const auto &p : peers) { | for (const auto &p : peers) { | ||||
func(p); | func(p); | ||||
} | } | ||||
} | } | ||||
/** For a given peer, return the nodes associated with it */ | |||||
std::vector<NodeId> nodesForPeer(const PeerId &) const; | |||||
/** | /** | ||||
* Update the peer set when a new block is connected. | * Update the peer set when a new block is connected. | ||||
*/ | */ | ||||
void updatedBlockTip(); | void updatedBlockTip(); | ||||
/** | /** | ||||
* Proof broadcast API. | * Proof broadcast API. | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |