xmr-btc-swap/swap/src/network.rs
Thomas Eizinger 601bf07255
Introduce quote protocol and display it to the user before they fund
Previously, the user neither knew the price nor the maximum quantity
they could trade. We now request a quote from the user and display
it to them.

Fixes #255.
2021-03-04 16:26:27 +11:00

22 lines
454 B
Rust

pub mod peer_tracker;
pub mod quote;
pub mod request_response;
pub mod spot_price;
pub mod transport;
use libp2p::core::Executor;
use std::future::Future;
use std::pin::Pin;
use tokio::runtime::Handle;
#[allow(missing_debug_implementations)]
pub struct TokioExecutor {
pub handle: Handle,
}
impl Executor for TokioExecutor {
fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>) {
let _ = self.handle.spawn(future);
}
}