From 2db9ebd28b6fa4579aad8dc17a89a19cd0e33f4e Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Mon, 30 Nov 2020 14:48:53 +1100 Subject: [PATCH] make new_swarm public --- swap/src/alice.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swap/src/alice.rs b/swap/src/alice.rs index adcfdfc0..0aa0eedf 100644 --- a/swap/src/alice.rs +++ b/swap/src/alice.rs @@ -280,7 +280,11 @@ pub async fn swap( pub type Swarm = libp2p::Swarm; -fn new_swarm(listen: Multiaddr, transport: SwapTransport, behaviour: Behaviour) -> Result { +pub fn new_swarm( + listen: Multiaddr, + transport: SwapTransport, + behaviour: Behaviour, +) -> Result { use anyhow::Context as _; let local_peer_id = behaviour.peer_id();