Function start_zone_p2p

Source
pub async fn start_zone_p2p<N, T>(
    blockchain_read_handle: BlockchainReadHandle,
    blockchain_context_service: BlockchainContextService,
    txpool_read_handle: TxpoolReadHandle,
    config: P2PConfig<N>,
    transport_config: TransportConfig<N, T>,
) -> Result<(NetworkInterface<N>, Sender<IncomingTxHandler>), BoxError>
Expand description

Starts the P2P network zone, returning a NetworkInterface to interact with it.

A oneshot::Sender is also returned to provide the IncomingTxHandler, until this is provided network handshakes can not be completed.