Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 518 Lines • ▼ Show 20 Lines | std::shared_ptr<Proof> Processor::getLocalProof() const { | ||||
return peerData ? peerData->proof : nullptr; | return peerData ? peerData->proof : nullptr; | ||||
} | } | ||||
Peer::Timestamp Processor::getProofTime(const ProofId &proofid) const { | Peer::Timestamp Processor::getProofTime(const ProofId &proofid) const { | ||||
LOCK(cs_peerManager); | LOCK(cs_peerManager); | ||||
return peerManager->getProofTime(proofid); | return peerManager->getProofTime(proofid); | ||||
} | } | ||||
std::shared_ptr<Proof> Processor::getOrphan(const ProofId &proofid) const { | |||||
LOCK(cs_peerManager); | |||||
return peerManager->getOrphan(proofid); | |||||
} | |||||
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 |