mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-07-23 23:11:11 -04:00
Top to bottom pub mod
then mod
then pub use
then use
(incl. use crate
and use self
)
This commit is contained in:
parent
44c4b5dcea
commit
433704e48c
14 changed files with 38 additions and 33 deletions
|
@ -1,8 +1,8 @@
|
|||
pub mod testutils;
|
||||
|
||||
use swap::protocol::{alice, bob};
|
||||
use tokio::join;
|
||||
|
||||
pub mod testutils;
|
||||
|
||||
/// Run the following tests with RUST_MIN_STACK=10000000
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use swap::protocol::{alice, alice::AliceState, bob};
|
||||
|
||||
pub mod testutils;
|
||||
|
||||
use swap::protocol::{alice, alice::AliceState, bob};
|
||||
|
||||
#[tokio::test]
|
||||
async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
|
||||
testutils::setup_test(|mut ctx| async move {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use swap::protocol::{alice, bob, bob::BobState};
|
||||
|
||||
pub mod testutils;
|
||||
|
||||
use swap::protocol::{alice, bob, bob::BobState};
|
||||
|
||||
#[tokio::test]
|
||||
async fn given_bob_restarts_after_encsig_is_sent_resume_swap() {
|
||||
testutils::setup_test(|mut ctx| async move {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
pub mod testutils;
|
||||
|
||||
use swap::protocol::{
|
||||
alice, bob,
|
||||
bob::{swap::is_xmr_locked, BobState},
|
||||
};
|
||||
|
||||
pub mod testutils;
|
||||
|
||||
#[tokio::test]
|
||||
async fn given_bob_restarts_after_xmr_is_locked_resume_swap() {
|
||||
testutils::setup_test(|mut ctx| async move {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
pub mod testutils;
|
||||
|
||||
use swap::protocol::{
|
||||
alice, bob,
|
||||
bob::{swap::is_btc_locked, BobState},
|
||||
};
|
||||
|
||||
pub mod testutils;
|
||||
|
||||
/// Bob locks Btc and Alice locks Xmr. Bob does not act; he fails to send Alice
|
||||
/// the encsig and fail to refund or redeem. Alice punishes.
|
||||
#[tokio::test]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use swap::protocol::{alice, alice::AliceState, bob};
|
||||
|
||||
pub mod testutils;
|
||||
|
||||
use swap::protocol::{alice, alice::AliceState, bob};
|
||||
|
||||
/// Bob locks btc and Alice locks xmr. Alice fails to act so Bob refunds. Alice
|
||||
/// then also refunds.
|
||||
#[tokio::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue