Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 517 Lines • ▼ Show 20 Lines | bool Processor::registerVotes(NodeId nodeid, const Response &response, | ||||
return true; | return true; | ||||
} | } | ||||
bool Processor::addNode(NodeId nodeid, const ProofId &proofid) { | bool Processor::addNode(NodeId nodeid, const ProofId &proofid) { | ||||
LOCK(cs_peerManager); | LOCK(cs_peerManager); | ||||
return peerManager->addNode(nodeid, proofid); | return peerManager->addNode(nodeid, proofid); | ||||
} | } | ||||
bool Processor::forNode(NodeId nodeid, | |||||
std::function<bool(const Node &n)> func) const { | |||||
LOCK(cs_peerManager); | |||||
return peerManager->forNode(nodeid, std::move(func)); | |||||
} | |||||
CPubKey Processor::getSessionPubKey() const { | CPubKey Processor::getSessionPubKey() const { | ||||
return sessionKey.GetPubKey(); | return sessionKey.GetPubKey(); | ||||
} | } | ||||
uint256 Processor::buildLocalSighash(CNode *pfrom) const { | uint256 Processor::buildLocalSighash(CNode *pfrom) const { | ||||
CHashWriter hasher(SER_GETHASH, 0); | CHashWriter hasher(SER_GETHASH, 0); | ||||
hasher << peerData->delegation.getId(); | hasher << peerData->delegation.getId(); | ||||
hasher << pfrom->GetLocalNonce(); | hasher << pfrom->GetLocalNonce(); | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |