Move definitions out of lib.rs

This commit is contained in:
Franck Royer 2021-01-21 13:43:25 +11:00
parent b88a777bae
commit f2a25ee49b
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
16 changed files with 85 additions and 81 deletions

View file

@ -1,16 +1,3 @@
use anyhow::{Context, Result};
use ecdsa_fun::{adaptor::Adaptor, nonce::Deterministic};
use futures::{
future::{select, Either},
pin_mut,
};
use libp2p::request_response::ResponseChannel;
use rand::rngs::OsRng;
use sha2::Sha256;
use std::sync::Arc;
use tokio::time::timeout;
use tracing::{info, trace};
use crate::{
bitcoin,
bitcoin::{
@ -27,9 +14,21 @@ use crate::{
protocol::{
alice,
alice::{event_loop::EventLoopHandle, SwapResponse},
SwapAmounts,
},
SwapAmounts,
};
use anyhow::{Context, Result};
use ecdsa_fun::{adaptor::Adaptor, nonce::Deterministic};
use futures::{
future::{select, Either},
pin_mut,
};
use libp2p::request_response::ResponseChannel;
use rand::rngs::OsRng;
use sha2::Sha256;
use std::sync::Arc;
use tokio::time::timeout;
use tracing::{info, trace};
pub async fn negotiate(
state0: alice::State0,