mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-03 12:06:17 -04:00
Merge #99
99: Cleanup resume_from_database functions only used in tests r=da-kami a=da-kami Follow up of https://github.com/comit-network/xmr-btc-swap/pull/88 Co-authored-by: Daniel Karzel <daniel@comit.network>
This commit is contained in:
commit
3db71997d3
4 changed files with 14 additions and 53 deletions
|
@ -9,6 +9,7 @@ use xmr_btc::config::Config;
|
|||
pub mod testutils;
|
||||
|
||||
use crate::testutils::{init_alice, init_bob};
|
||||
use std::convert::TryFrom;
|
||||
use testutils::init_tracing;
|
||||
|
||||
#[tokio::test]
|
||||
|
@ -119,7 +120,11 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
|
|||
testutils::init_alice_event_loop(alice_multiaddr);
|
||||
let _alice_swarm_fut = tokio::spawn(async move { event_loop_after_restart.run().await });
|
||||
|
||||
let alice_state = alice::swap::resume_from_database(
|
||||
let db_swap = alice_db.get_state(alice_swap_id).unwrap();
|
||||
let resume_state = AliceState::try_from(db_swap).unwrap();
|
||||
|
||||
let alice_state = alice::swap::swap(
|
||||
resume_state,
|
||||
event_loop_handle_after_restart,
|
||||
alice_btc_wallet.clone(),
|
||||
alice_xmr_wallet.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue