Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | std::map<CBlockIndex *, Vote> responseIndex; | ||||
: BlockUpdate::Status::Invalid); | : BlockUpdate::Status::Invalid); | ||||
w->erase(it); | w->erase(it); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool Processor::addPeer(NodeId nodeid, int64_t score, const CPubKey &pubkey) { | bool Processor::addPeer(NodeId nodeid, const Proof &proof, | ||||
const CPubKey &pubkey) { | |||||
LOCK(cs_peerManager); | LOCK(cs_peerManager); | ||||
return peerManager->addNode(Proof(score), nodeid, pubkey); | return peerManager->addNode(nodeid, proof, pubkey); | ||||
} | } | ||||
bool Processor::forNode(NodeId nodeid, | bool Processor::forNode(NodeId nodeid, | ||||
std::function<bool(const Node &n)> func) const { | std::function<bool(const Node &n)> func) const { | ||||
LOCK(cs_peerManager); | LOCK(cs_peerManager); | ||||
return peerManager->forNode(nodeid, std::move(func)); | return peerManager->forNode(nodeid, std::move(func)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |