mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-11 15:39:37 -05:00
Fix buld after merge of db branch
This commit is contained in:
parent
3e0b40c248
commit
2a07113074
@ -5,7 +5,7 @@ use crate::{
|
||||
WatchForRawTransaction,
|
||||
},
|
||||
monero,
|
||||
monero::{CheckTransfer, CreateWalletForOutput, WatchForTransfer},
|
||||
monero::{CreateWalletForOutput, WatchForTransfer},
|
||||
serde::{bitcoin_amount, cross_curve_dleq_scalar, monero_private_key},
|
||||
transport::{ReceiveMessage, SendMessage},
|
||||
};
|
||||
|
@ -62,7 +62,7 @@ pub fn init_alice_and_bob_transports() -> (
|
||||
}
|
||||
|
||||
pub async fn init_test<'a>(
|
||||
monero: &'a Monero<'a>,
|
||||
monero: &'a Monero,
|
||||
bitcoind: &Bitcoind<'a>,
|
||||
) -> (
|
||||
alice::State0,
|
||||
@ -391,7 +391,7 @@ mod tests {
|
||||
.set_default();
|
||||
|
||||
let cli = Cli::default();
|
||||
let monero = Monero::new(&cli);
|
||||
let (monero, _container) = Monero::new(&cli);
|
||||
let bitcoind = init_bitcoind(&cli).await;
|
||||
let alice_db = harness::storage::Database::open(Path::new(ALICE_TEST_DB_FOLDER)).unwrap();
|
||||
let bob_db = harness::storage::Database::open(Path::new(BOB_TEST_DB_FOLDER)).unwrap();
|
||||
@ -468,21 +468,11 @@ mod tests {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let alice_final_xmr_balance = alice_node
|
||||
.monero_wallet
|
||||
.0
|
||||
.get_balance_alice()
|
||||
.await
|
||||
.unwrap();
|
||||
let alice_final_xmr_balance = alice_node.monero_wallet.0.get_balance(0).await.unwrap();
|
||||
|
||||
bob_node
|
||||
.monero_wallet
|
||||
.0
|
||||
.wait_for_bob_wallet_block_height()
|
||||
.await
|
||||
.unwrap();
|
||||
monero.wait_for_bob_wallet_block_height().await.unwrap();
|
||||
|
||||
let bob_final_xmr_balance = bob_node.monero_wallet.0.get_balance_bob().await.unwrap();
|
||||
let bob_final_xmr_balance = bob_node.monero_wallet.0.get_balance(0).await.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
alice_final_btc_balance,
|
||||
|
@ -106,7 +106,7 @@ mod tests {
|
||||
async fn recover_state_from_db() {
|
||||
let db = Database::open(Path::new("../target/test_recover.db")).unwrap();
|
||||
|
||||
let a = crate::bitcoin::SecretKey::new_random(&mut OsRng);
|
||||
let a = xmr_btc::bitcoin::SecretKey::new_random(&mut OsRng);
|
||||
let s_a = cross_curve_dleq::Scalar::random(&mut OsRng);
|
||||
let s_b = monero::PrivateKey::from_scalar(Scalar::random(&mut OsRng));
|
||||
let v_a = xmr_btc::monero::PrivateViewKey::new_random(&mut OsRng);
|
||||
@ -125,7 +125,7 @@ mod tests {
|
||||
S_a_bitcoin,
|
||||
v: v_a,
|
||||
btc: ::bitcoin::Amount::from_sat(100),
|
||||
xmr: crate::monero::Amount::from_piconero(1000),
|
||||
xmr: xmr_btc::monero::Amount::from_piconero(1000),
|
||||
refund_timelock: 0,
|
||||
refund_address: ::bitcoin::Address::from_str("1L5wSMgerhHg8GZGcsNmAx5EXMRXSKR3He")
|
||||
.unwrap(),
|
||||
|
Loading…
Reference in New Issue
Block a user