fedimint_core::net::peers::fake

Function make_fake_peer_connection

Source
pub fn make_fake_peer_connection<Msg>(
    peer1: PeerId,
    peer2: PeerId,
    buf_size: usize,
    task_handle: TaskHandle,
) -> (PeerConnections<Msg>, PeerConnections<Msg>)
where Msg: Serialize + DeserializeOwned + Unpin + Send + 'static,
Expand description

Create a fake link between peer1 and peer2 for test purposes

buf_size controls the size of the tokio::mpsc::channel used under the hood (both ways).