Add minimum monero confirmations to config use it for Bob

This commit is contained in:
Daniel Karzel 2021-01-05 17:09:55 +11:00
parent c6bc45e7a0
commit e031681369
12 changed files with 44 additions and 3 deletions

View file

@ -98,6 +98,7 @@ async fn happy_path() {
bob_xmr_wallet.clone(),
OsRng,
Uuid::new_v4(),
config,
)
.boxed();

View file

@ -83,6 +83,7 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
bob_xmr_wallet.clone(),
OsRng,
Uuid::new_v4(),
config,
);
let alice_db_datadir = tempdir().unwrap();

View file

@ -106,6 +106,7 @@ async fn given_bob_restarts_after_encsig_is_sent_resume_swap() {
bob_xmr_wallet.clone(),
OsRng,
bob_swap_id,
config,
)
.await
.unwrap();
@ -134,6 +135,7 @@ async fn given_bob_restarts_after_encsig_is_sent_resume_swap() {
bob_xmr_wallet,
OsRng,
bob_swap_id,
config,
)
.await
.unwrap();

View file

@ -95,6 +95,7 @@ async fn given_bob_restarts_after_xmr_is_locked_resume_swap() {
bob_xmr_wallet.clone(),
OsRng,
bob_swap_id,
Config::regtest(),
)
};
@ -120,6 +121,7 @@ async fn given_bob_restarts_after_xmr_is_locked_resume_swap() {
bob_xmr_wallet.clone(),
OsRng,
bob_swap_id,
Config::regtest(),
);
let bob_final_state = select! {

View file

@ -84,6 +84,7 @@ async fn alice_punishes_if_bob_never_acts_after_fund() {
bob_xmr_wallet.clone(),
OsRng,
Uuid::new_v4(),
config,
)
.boxed();

View file

@ -81,6 +81,7 @@ async fn given_alice_restarts_after_xmr_is_locked_abort_swap() {
bob_xmr_wallet.clone(),
OsRng,
Uuid::new_v4(),
Config::regtest(),
);
let alice_swap_id = Uuid::new_v4();

View file

@ -176,6 +176,7 @@ pub async fn init_bob_state(
config.bitcoin_cancel_timelock,
config.bitcoin_punish_timelock,
refund_address,
config.monero_finality_confirmations,
);
BobState::Started { state0, amounts }