make new_swarm public

This commit is contained in:
Franck Royer 2020-11-30 14:48:53 +11:00 committed by rishflab
parent 9e13034e54
commit 2db9ebd28b

View File

@ -280,7 +280,11 @@ pub async fn swap(
pub type Swarm = libp2p::Swarm<Behaviour>;
fn new_swarm(listen: Multiaddr, transport: SwapTransport, behaviour: Behaviour) -> Result<Swarm> {
pub fn new_swarm(
listen: Multiaddr,
transport: SwapTransport,
behaviour: Behaviour,
) -> Result<Swarm> {
use anyhow::Context as _;
let local_peer_id = behaviour.peer_id();