diff --git a/swap/concurrent_bobs_before_xmr_lock_proof_sent.txt b/swap/concurrent_bobs_before_xmr_lock_proof_sent.txt new file mode 100644 index 00000000..1a88bfde --- /dev/null +++ b/swap/concurrent_bobs_before_xmr_lock_proof_sent.txt @@ -0,0 +1,9 @@ + +running 1 test +2024-06-28T14:26:34.451940Z  INFO testcontainers::core::logs: Found message after comparing 76 lines +2024-06-28T14:26:38.028659Z  INFO testcontainers::core::logs: Found message after comparing 2 lines +2024-06-28T14:26:38.049614Z  INFO monero_harness: Starting monerod: S7RU_monerod +2024-06-28T14:26:40.014081Z  INFO testcontainers::core::logs: Found message after comparing 197 lines +2024-06-28T14:26:40.034969Z  INFO monero_harness: Starting miner wallet: miner +2024-06-28T14:26:42.084045Z  INFO testcontainers::core::logs: Found message after comparing 14 lines +2024-06-28T14:26:43.604128Z  INFO monero_harness: Starting wallet: alice diff --git a/swap/src/cli/event_loop.rs b/swap/src/cli/event_loop.rs index a3ed75ef..98c40ee6 100644 --- a/swap/src/cli/event_loop.rs +++ b/swap/src/cli/event_loop.rs @@ -144,8 +144,7 @@ impl EventLoop { }else { tracing::warn!( %swap_id, - "Ignoring transfer proof for swap {} while running swap {}. Expected to receive it from {}", - swap_id, + "Ignoring malicious transfer proof from {}, expected to receive it from {}", self.swap_id, buffer_swap_alice_peer_id); continue; @@ -166,7 +165,7 @@ impl EventLoop { if let Some(sqlx::Error::RowNotFound) = e.downcast_ref::() { tracing::warn!("Ignoring transfer proof for swap {} while running swap {}. We do not have a record of this swap", swap_id, self.swap_id); } else { - tracing::error!("Ignoring transfer proof for swap {} while running swap {}. Failed to retrieve the peer id of the corresponding swap: {:#}", swap_id, self.swap_id, e); + tracing::error!("Ignoring transfer proof for swap {} while running swap {}. Failed to retrieve the peer id of Alice for the corresponding swap: {:#}", swap_id, self.swap_id, e); } } } diff --git a/swap/tests/concurrent_bobs_before_xmr_lock_proof_sent.rs b/swap/tests/concurrent_bobs_before_xmr_lock_proof_sent.rs index 383251af..bf8adb06 100644 --- a/swap/tests/concurrent_bobs_before_xmr_lock_proof_sent.rs +++ b/swap/tests/concurrent_bobs_before_xmr_lock_proof_sent.rs @@ -47,12 +47,12 @@ async fn concurrent_bobs_before_xmr_lock_proof_sent() { // The 1st (paused) swap is expected to finish successfully because the transfer proof is buffered when it is receives while another swap is running. - let alice_state_1 = alice_swap_1.await??; - assert!(matches!(alice_state_1, AliceState::BtcRedeemed { .. })); - let bob_state_1 = bob::run(bob_swap_1).await?; assert!(matches!(bob_state_1, BobState::XmrRedeemed { .. })); + let alice_state_1 = alice_swap_1.await??; + assert!(matches!(alice_state_1, AliceState::BtcRedeemed { .. })); + Ok(()) }) .await;