Convert event loop to use fused futures select

Co-authored-by: Daniel Karzel <daniel@comit.network>
This commit is contained in:
rishflab 2020-12-09 18:08:26 +11:00
parent 58da1df9dc
commit 3d8866f1a0
4 changed files with 102 additions and 73 deletions

View file

@ -20,7 +20,7 @@ use xmr_btc::{bitcoin, config::Config, cross_curve_dleq};
async fn happy_path() {
use tracing_subscriber::util::SubscriberInitExt as _;
let _guard = tracing_subscriber::fmt()
.with_env_filter("swap=info,xmr_btc=info")
.with_env_filter("swap=trace,xmr_btc=trace")
.with_ansi(false)
.set_default();
@ -48,7 +48,7 @@ async fn happy_path() {
let (
alice_state,
mut alice_swarm,
mut alice_swarm_driver,
alice_swarm_handle,
alice_btc_wallet,
alice_xmr_wallet,
@ -85,7 +85,7 @@ async fn happy_path() {
Config::regtest(),
);
let _alice_swarm_fut = tokio::spawn(async move { alice_swarm.run().await });
let _alice_swarm_fut = tokio::spawn(async move { alice_swarm_driver.run().await });
let bob_swap_fut = bob::swap::swap(
bob_state,