Skip to main content

init_with_block_gossip_peer_ips

Function init_with_block_gossip_peer_ips 

Source
pub async fn init_with_block_gossip_peer_ips<S, C>(
    config: Config,
    inbound_service: S,
    latest_chain_tip: C,
    user_agent: String,
    block_gossip_peer_ips: Vec<IpAddr>,
) -> (Buffer<BoxService<Request, Response, BoxError>, Request>, Arc<Mutex<AddressBook>>, Sender<(PeerSocketAddr, u32)>)
where S: Service<Request, Response = Response, Error = BoxError> + Clone + Send + Sync + 'static, S::Future: Send + 'static, C: ChainTip + Clone + Send + Sync + 'static,
Expand description

Initialize a peer set like init, additionally pinning block inventory broadcasts to the inbound peers at block_gossip_peer_ips.

Inbound peers connecting from these IP addresses always receive block inventory broadcasts, and one inbound connection slot is reserved for them. This is used by zcashd-compat mode, where a zcashd wallet sidecar makes a single P2P connection to this node and must reliably learn about new blocks.