Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.h
Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | public: | ||||
* | * | ||||
* @returns Pointer to proof for this node, nullptr if there isn't one. | * @returns Pointer to proof for this node, nullptr if there isn't one. | ||||
*/ | */ | ||||
const Proof *getLocalProof() const; | const Proof *getLocalProof() const; | ||||
std::vector<avalanche::Peer> getPeers() const; | std::vector<avalanche::Peer> getPeers() const; | ||||
std::vector<NodeId> getNodeIdsForPeer(PeerId peerId) const; | std::vector<NodeId> getNodeIdsForPeer(PeerId peerId) const; | ||||
/** | |||||
* Add a proof and return true if it is verifies successfully. | |||||
*/ | |||||
bool addProof(Proof &&proof); | |||||
/** Return a pointer to a proof or nullptr if we don't have it */ | |||||
const Proof *getProof(const ProofId proofId) const; | |||||
bool startEventLoop(CScheduler &scheduler); | bool startEventLoop(CScheduler &scheduler); | ||||
bool stopEventLoop(); | bool stopEventLoop(); | ||||
private: | private: | ||||
void runEventLoop(); | void runEventLoop(); | ||||
void clearTimedoutRequests(); | void clearTimedoutRequests(); | ||||
std::vector<CInv> getInvsForNextPoll(bool forPoll = true); | std::vector<CInv> getInvsForNextPoll(bool forPoll = true); | ||||
NodeId getSuitableNodeToQuery(); | NodeId getSuitableNodeToQuery(); | ||||
Show All 18 Lines |