Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.h
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | public: | ||||
int getConfidence(const CBlockIndex *pindex) const; | int getConfidence(const CBlockIndex *pindex) const; | ||||
// TODO: 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; | |||||
template <typename Callable> auto withPeerManager(Callable &&func) const { | template <typename Callable> auto withPeerManager(Callable &&func) const { | ||||
LOCK(cs_peerManager); | LOCK(cs_peerManager); | ||||
return func(*peerManager); | return func(*peerManager); | ||||
} | } | ||||
CPubKey getSessionPubKey() const; | CPubKey getSessionPubKey() const; | ||||
bool sendHello(CNode *pfrom) const; | bool sendHello(CNode *pfrom) const; | ||||
Show All 35 Lines |