Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.h
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | public: | ||||
void setQueryTimeoutDuration(std::chrono::milliseconds d) { | void setQueryTimeoutDuration(std::chrono::milliseconds d) { | ||||
queryTimeoutDuration = d; | queryTimeoutDuration = d; | ||||
} | } | ||||
bool addBlockToReconcile(const CBlockIndex *pindex); | bool addBlockToReconcile(const CBlockIndex *pindex); | ||||
bool isAccepted(const CBlockIndex *pindex) const; | bool isAccepted(const CBlockIndex *pindex) const; | ||||
int getConfidence(const CBlockIndex *pindex) const; | int getConfidence(const CBlockIndex *pindex) const; | ||||
// TDOD: Refactor the API to remove the dependency on avalanche/protocol.h | // TODO: Refactor the API to remove the dependency on avalanche/protocol.h | ||||
void sendResponse(CNode *pfrom, Response response) const; | void sendResponse(CNode *pfrom, Response response) const; | ||||
bool registerVotes(NodeId nodeid, const Response &response, | bool registerVotes(NodeId nodeid, const Response &response, | ||||
std::vector<BlockUpdate> &updates); | std::vector<BlockUpdate> &updates); | ||||
bool addNode(NodeId nodeid, const ProofId &proofid); | bool addNode(NodeId nodeid, const ProofId &proofid); | ||||
bool forNode(NodeId nodeid, std::function<bool(const Node &n)> func) const; | bool forNode(NodeId nodeid, std::function<bool(const Node &n)> func) const; | ||||
template <typename Callable> auto withPeerManager(Callable &&func) const { | template <typename Callable> auto withPeerManager(Callable &&func) const { | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |