Skip to main content

handle_sync_request

Function handle_sync_request 

Source
pub async fn handle_sync_request(
    sender: &PeerId,
    _request: &NeighborSyncRequest,
    p2p_node: &Arc<P2PNode>,
    storage: &Arc<LmdbStorage>,
    paid_list: &Arc<PaidList>,
    config: &ReplicationConfig,
    is_bootstrapping: bool,
) -> (NeighborSyncResponse, bool)
Expand description

Handle incoming sync request from a peer.

Rules 4-6: Validate peer is in LocalRT. If yes, bidirectional sync. If not, outbound-only (send hints but don’t accept inbound).

Returns (response, sender_in_routing_table) where the second element indicates whether the caller should process the sender’s inbound hints.