Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 2,138 Lines • ▼ Show 20 Lines | FindProofForGetData(const CNode &peer, const avalanche::ProofId &proofid, | ||||
bool send_unconditionally = | bool send_unconditionally = | ||||
g_avalanche->withPeerManager([&](const avalanche::PeerManager &pm) { | g_avalanche->withPeerManager([&](const avalanche::PeerManager &pm) { | ||||
return pm.forPeer(proofid, [&](const avalanche::Peer &peer) { | return pm.forPeer(proofid, [&](const avalanche::Peer &peer) { | ||||
proof = peer.proof; | proof = peer.proof; | ||||
// If we know that proof for long enough, allow for requesting | // If we know that proof for long enough, allow for requesting | ||||
// it. | // it. | ||||
return peer.registration_time <= | return pm.getRegistrationTime(peer.getProofId()) <= | ||||
now - UNCONDITIONAL_RELAY_DELAY; | now - UNCONDITIONAL_RELAY_DELAY; | ||||
}); | }); | ||||
}); | }); | ||||
// We don't have this proof | // We don't have this proof | ||||
if (!proof) { | if (!proof) { | ||||
return nullptr; | return nullptr; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,871 Lines • Show Last 20 Lines |