pub async fn start_clearnet_p2p(
blockchain_read_handle: BlockchainReadHandle,
blockchain_context_service: BlockChainContextService,
txpool_read_handle: TxpoolReadHandle,
config: P2PConfig<ClearNet>,
) -> Result<(NetworkInterface<ClearNet>, Sender<IncomingTxHandler>), BoxError>
Expand description
Starts the P2P clearnet network, 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.