Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 507 Lines • ▼ Show 20 Lines | return !peerManager->getProof(proof->getId()) && | ||||
peerManager->getPeerId(proof) != NO_PEER; | peerManager->getPeerId(proof) != NO_PEER; | ||||
} | } | ||||
std::shared_ptr<Proof> Processor::getProof(const ProofId &proofid) const { | std::shared_ptr<Proof> Processor::getProof(const ProofId &proofid) const { | ||||
LOCK(cs_peerManager); | LOCK(cs_peerManager); | ||||
return peerManager->getProof(proofid); | return peerManager->getProof(proofid); | ||||
} | } | ||||
std::shared_ptr<Proof> Processor::getLocalProof() const { | |||||
return peerData ? peerData->proof : nullptr; | |||||
} | |||||
bool Processor::startEventLoop(CScheduler &scheduler) { | bool Processor::startEventLoop(CScheduler &scheduler) { | ||||
return eventLoop.startEventLoop( | return eventLoop.startEventLoop( | ||||
scheduler, [this]() { this->runEventLoop(); }, AVALANCHE_TIME_STEP); | scheduler, [this]() { this->runEventLoop(); }, AVALANCHE_TIME_STEP); | ||||
} | } | ||||
bool Processor::stopEventLoop() { | bool Processor::stopEventLoop() { | ||||
return eventLoop.stopEventLoop(); | return eventLoop.stopEventLoop(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |