From 64fb090eeadd8d84ed8d4141eb2e1425b973ecaf Mon Sep 17 00:00:00 2001 From: patrini32 <171664803+patrini32@users.noreply.github.com> Date: Sun, 9 Jun 2024 19:45:01 +0300 Subject: [PATCH] beautify comments --- ...anually_punishes_after_bob_dead_and_bob_cancels.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/swap/tests/alice_manually_punishes_after_bob_dead_and_bob_cancels.rs b/swap/tests/alice_manually_punishes_after_bob_dead_and_bob_cancels.rs index 8885b1c5..31a7cf07 100644 --- a/swap/tests/alice_manually_punishes_after_bob_dead_and_bob_cancels.rs +++ b/swap/tests/alice_manually_punishes_after_bob_dead_and_bob_cancels.rs @@ -69,23 +69,24 @@ async fn alice_manually_punishes_after_bob_dead_and_bob_cancels() { let (_, alice_state) = asb::punish(alice_swap.swap_id, alice_swap.bitcoin_wallet, alice_swap.db).await?; ctx.assert_alice_punished(alice_state).await; - + // Bob is in wrong state. let (bob_swap, bob_join_handle) = ctx .stop_and_resume_bob_from_db(bob_join_handle, bob_swap_id) .await; - assert!(matches!(bob_swap.state, BobState::BtcLocked { .. })); // Bob is in wrong state. + assert!(matches!(bob_swap.state, BobState::BtcLocked { .. })); bob_join_handle.abort(); let (_, state) = cli::cancel(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db).await?; - assert!(matches!(state, BobState::BtcCancelled { .. })); // Bob should be in BtcCancelled state now. + // Bob should be in BtcCancelled state now. + assert!(matches!(state, BobState::BtcCancelled { .. })); let (bob_swap, _) = ctx .stop_and_resume_bob_from_db(bob_join_handle, bob_swap_id) .await; assert!(matches!(bob_swap.state, BobState::BtcCancelled { .. })); - + // Alice punished Bob, so he should be in the BtcPunished state. let state = cli::refund(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db).await?; - ctx.assert_bob_punished(state).await; // Bob should be in BtcPunished state now. + ctx.assert_bob_punished(state).await; Ok(()) }) .await;