mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-29 20:16:33 -05:00
Include unreachable nodes in table output
We emit an `info!` log for every peer that we discover but only ever emitted a `debug!` log if we fail to connect. This leads to a situation where the user would run `swap list-sellers`, the logs would say "Discovered XYZ at ABC" but then get a potentially empty table. To not confuse the user, we include unreachable nodes in the table output. For example: ``` Connected to rendezvous point, discovering nodes in 'xmr-btc-swap-testnet' namespace ... Discovered peer 12D3KooWPZ69DRp4wbGB3wJsxxsg1XW1EVZ2evtVwcARCF3a1nrx at /dns4/ac4hgzmsmekwekjbdl77brufqqbylddugzze4tel6qsnlympgmr46iid.onion/tcp/8765 +-------+--------------+--------------+-------------+----------------------------------------------------------------------------------------------------------------------------------------+ | PRICE | MIN_QUANTITY | MAX_QUANTITY | STATUS | ADDRESS | +============================================================================================================================================================================================+ | ??? | ??? | ??? | Unreachable | /dns4/ac4hgzmsmekwekjbdl77brufqqbylddugzze4tel6qsnlympgmr46iid.onion/tcp/8765/p2p/12D3KooWPZ69DRp4wbGB3wJsxxsg1XW1EVZ2evtVwcARCF3a1nrx | +-------+--------------+--------------+-------------+----------------------------------------------------------------------------------------------------------------------------------------+ ```
This commit is contained in:
parent
09f395a26b
commit
987f8abb9d
4 changed files with 123 additions and 25 deletions
|
|
@ -10,14 +10,14 @@ pub mod transport;
|
|||
pub use behaviour::{Behaviour, OutEvent};
|
||||
pub use cancel::cancel;
|
||||
pub use event_loop::{EventLoop, EventLoopHandle};
|
||||
pub use list_sellers::list_sellers;
|
||||
pub use list_sellers::{list_sellers, Seller, Status as SellerStatus};
|
||||
pub use refund::refund;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::asb;
|
||||
use crate::cli::list_sellers::Seller;
|
||||
use crate::cli::list_sellers::{Seller, Status};
|
||||
use crate::network::quote;
|
||||
use crate::network::quote::BidQuote;
|
||||
use crate::network::rendezvous::XmrBtcNamespace;
|
||||
|
|
@ -122,7 +122,7 @@ mod tests {
|
|||
|
||||
Seller {
|
||||
multiaddr: asb_address.with(Protocol::P2p(asb_peer_id.into())),
|
||||
quote: static_quote,
|
||||
status: Status::Online(static_quote),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue