diff --git a/swap/src/network/test.rs b/swap/src/network/test.rs index 5a324385..f27c3824 100644 --- a/swap/src/network/test.rs +++ b/swap/src/network/test.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; use futures::stream::FusedStream; -use futures::{future, Future, Stream, StreamExt}; +use futures::{future, Future, StreamExt}; use libp2p::core::muxing::StreamMuxerBox; use libp2p::core::transport::upgrade::Version; use libp2p::core::transport::MemoryTransport; @@ -75,8 +75,8 @@ async fn get_local_tcp_address() -> Multiaddr { } pub async fn await_events_or_timeout( - swarm_1: &mut (impl Stream> + FusedStream + Unpin), - swarm_2: &mut (impl Stream> + FusedStream + Unpin), + swarm_1: &mut (impl FusedStream> + FusedStream + Unpin), + swarm_2: &mut (impl FusedStream> + FusedStream + Unpin), ) -> (SwarmEvent, SwarmEvent) where SwarmEvent: Debug, diff --git a/swap/tests/harness/mod.rs b/swap/tests/harness/mod.rs index f1327ef4..028b0935 100644 --- a/swap/tests/harness/mod.rs +++ b/swap/tests/harness/mod.rs @@ -435,10 +435,10 @@ impl BobParams { } let db = Arc::new(SqliteDatabase::open(&self.db_path).await?); - let (event_loop, handle) = self.new_eventloop(swap_id, db).await?; + let (event_loop, handle) = self.new_eventloop(swap_id, db.clone()).await?; let swap = bob::Swap::from_db( - db, + db.clone(), swap_id, self.bitcoin_wallet.clone(), self.monero_wallet.clone(), @@ -504,7 +504,7 @@ impl BobParams { .behaviour_mut() .add_address(self.alice_peer_id, self.alice_address.clone()); - cli::EventLoop::new(swap_id, swarm, self.alice_peer_id, db.clone()); + cli::EventLoop::new(swap_id, swarm, self.alice_peer_id, db.clone()) } }