Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/peermanager.cpp
Show First 20 Lines • Show All 439 Lines • ▼ Show 20 Lines | void PeerManager::updatedBlockTip() { | ||||
orphanProofPool.rescan(*this); | orphanProofPool.rescan(*this); | ||||
for (auto &p : newOrphans) { | for (auto &p : newOrphans) { | ||||
orphanProofPool.addProofIfPreferred(p); | orphanProofPool.addProofIfPreferred(p); | ||||
} | } | ||||
} | } | ||||
ProofRef PeerManager::getProof(const ProofId &proofid) const { | ProofRef PeerManager::getProof(const ProofId &proofid) const { | ||||
ProofRef proof = nullptr; | ProofRef proof; | ||||
forPeer(proofid, [&](const Peer &p) { | forPeer(proofid, [&](const Peer &p) { | ||||
proof = p.proof; | proof = p.proof; | ||||
return true; | return true; | ||||
}); | }); | ||||
if (!proof) { | if (!proof) { | ||||
proof = conflictingProofPool.getProof(proofid); | proof = conflictingProofPool.getProof(proofid); | ||||
▲ Show 20 Lines • Show All 296 Lines • Show Last 20 Lines |