Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/proofpool.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
ProofRef ProofPool::getProof(const ProofId &proofid) const { | ProofRef ProofPool::getProof(const ProofId &proofid) const { | ||||
auto &poolView = pool.get<by_proofid>(); | auto &poolView = pool.get<by_proofid>(); | ||||
auto it = poolView.find(proofid); | auto it = poolView.find(proofid); | ||||
return it == poolView.end() ? nullptr : it->proof; | return it == poolView.end() ? nullptr : it->proof; | ||||
} | } | ||||
ProofRef ProofPool::getProof(const COutPoint &outpoint) const { | |||||
auto it = pool.find(outpoint); | |||||
return it == pool.end() ? nullptr : it->proof; | |||||
} | |||||
} // namespace avalanche | } // namespace avalanche |