Fix imports

This commit is contained in:
rishflab 2021-01-15 09:45:00 +11:00
parent a4cd75d394
commit f5cfe014be
3 changed files with 9 additions and 8 deletions

View File

@ -88,12 +88,11 @@ pub async fn run_until(
state: AliceState, state: AliceState,
is_target_state: fn(&AliceState) -> bool, is_target_state: fn(&AliceState) -> bool,
mut event_loop_handle: EventLoopHandle, mut event_loop_handle: EventLoopHandle,
bitcoin_wallet: Arc<crate::bitcoin::Wallet>, bitcoin_wallet: Arc<bitcoin::Wallet>,
monero_wallet: Arc<crate::monero::Wallet>, monero_wallet: Arc<monero::Wallet>,
config: Config, config: Config,
swap_id: Uuid, swap_id: Uuid,
db: Database, db: Database,
// TODO: Remove EventLoopHandle!
) -> Result<AliceState> { ) -> Result<AliceState> {
info!("Current state:{}", state); info!("Current state:{}", state);
if is_target_state(&state) { if is_target_state(&state) {

View File

@ -7,7 +7,9 @@ use tracing::info;
use uuid::Uuid; use uuid::Uuid;
use crate::{ use crate::{
bitcoin,
database::{Database, Swap}, database::{Database, Swap},
monero,
protocol::bob::{self, event_loop::EventLoopHandle, state::*}, protocol::bob::{self, event_loop::EventLoopHandle, state::*},
ExpiredTimelocks, SwapAmounts, ExpiredTimelocks, SwapAmounts,
}; };
@ -18,8 +20,8 @@ pub async fn swap<R>(
state: BobState, state: BobState,
event_loop_handle: EventLoopHandle, event_loop_handle: EventLoopHandle,
db: Database, db: Database,
bitcoin_wallet: Arc<crate::bitcoin::Wallet>, bitcoin_wallet: Arc<bitcoin::Wallet>,
monero_wallet: Arc<crate::monero::Wallet>, monero_wallet: Arc<monero::Wallet>,
rng: R, rng: R,
swap_id: Uuid, swap_id: Uuid,
) -> Result<BobState> ) -> Result<BobState>
@ -69,8 +71,8 @@ pub async fn run_until<R>(
is_target_state: fn(&BobState) -> bool, is_target_state: fn(&BobState) -> bool,
mut event_loop_handle: EventLoopHandle, mut event_loop_handle: EventLoopHandle,
db: Database, db: Database,
bitcoin_wallet: Arc<crate::bitcoin::Wallet>, bitcoin_wallet: Arc<bitcoin::Wallet>,
monero_wallet: Arc<crate::monero::Wallet>, monero_wallet: Arc<monero::Wallet>,
mut rng: R, mut rng: R,
swap_id: Uuid, swap_id: Uuid,
) -> Result<BobState> ) -> Result<BobState>

View File

@ -32,7 +32,7 @@ pub async fn init_wallets(
name: &str, name: &str,
bitcoind: &Bitcoind<'_>, bitcoind: &Bitcoind<'_>,
monero: &Monero, monero: &Monero,
btc_starting_balance: Option<::bitcoin::Amount>, btc_starting_balance: Option<bitcoin::Amount>,
xmr_starting_balance: Option<monero::Amount>, xmr_starting_balance: Option<monero::Amount>,
config: Config, config: Config,
) -> (Arc<bitcoin::Wallet>, Arc<monero::Wallet>) { ) -> (Arc<bitcoin::Wallet>, Arc<monero::Wallet>) {