Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.h
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
bool addNodeToPeer(PeerId peerid, NodeId nodeid, CPubKey pubkey); | bool addNodeToPeer(PeerId peerid, NodeId nodeid, CPubKey pubkey); | ||||
bool removeNode(NodeId nodeid); | bool removeNode(NodeId nodeid); | ||||
bool forNode(NodeId nodeid, std::function<bool(const Node &n)> func) const; | bool forNode(NodeId nodeid, std::function<bool(const Node &n)> func) const; | ||||
bool updateNextRequestTime(NodeId nodeid, TimePoint timeout); | bool updateNextRequestTime(NodeId nodeid, TimePoint timeout); | ||||
NodeId getSuitableNodeToQuery(); | NodeId selectNode(); | ||||
/** | /** | ||||
* Exposed for tests. | * Exposed for tests. | ||||
*/ | */ | ||||
PeerId selectPeer() const; | PeerId selectPeer() const; | ||||
/** | /** | ||||
* Trigger maintenance of internal datastructures. | * Trigger maintenance of internal datastructures. | ||||
Show All 27 Lines |