From 7fba6e8fbf4303b26045ab739f7971ae594f0451 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Mon, 5 Jul 2021 14:52:53 +1000 Subject: [PATCH] Debug print for receiving quote from seller --- swap/src/cli/list_sellers.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swap/src/cli/list_sellers.rs b/swap/src/cli/list_sellers.rs index 3895da60..a31f7cba 100644 --- a/swap/src/cli/list_sellers.rs +++ b/swap/src/cli/list_sellers.rs @@ -199,7 +199,9 @@ impl EventLoop { RequestResponseEvent::Message { peer, message } => { match message { RequestResponseMessage::Response { response, .. } => { - if self.asb_quote_status.insert(peer, QuoteStatus::Received(response)).is_none() { + if self.asb_quote_status.insert(peer, QuoteStatus::Received(response)).is_some() { + tracing::debug!(%peer, "Received bid quote {:?} from peer {}", response, peer); + } else { tracing::error!(%peer, "Received bid quote from unexpected peer, this record will be removed!"); self.asb_quote_status.remove(&peer); }