From f22786855ccbd17c291b04cc05b1b6e2960ac35b Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Tue, 24 Dec 2024 16:45:33 +0530 Subject: [PATCH] chore: filter p2p circuit addr inside bootstrap cache --- ant-bootstrap/src/lib.rs | 7 +++++++ ant-cli/src/main.rs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ant-bootstrap/src/lib.rs b/ant-bootstrap/src/lib.rs index 14a31ed821..cc0c7b4ceb 100644 --- a/ant-bootstrap/src/lib.rs +++ b/ant-bootstrap/src/lib.rs @@ -189,6 +189,13 @@ impl BootstrapAddr { /// /// ignore_peer_id is only used for nat-detection contact list pub fn craft_valid_multiaddr(addr: &Multiaddr, ignore_peer_id: bool) -> Option { + if addr + .iter() + .any(|protocol| matches!(&protocol, Protocol::P2pCircuit)) + { + return None; + } + let peer_id = addr .iter() .find(|protocol| matches!(protocol, Protocol::P2p(_))); diff --git a/ant-cli/src/main.rs b/ant-cli/src/main.rs index 971c38fd6a..0089c3062d 100644 --- a/ant-cli/src/main.rs +++ b/ant-cli/src/main.rs @@ -87,7 +87,7 @@ async fn main() -> Result<()> { fn init_logging_and_metrics(opt: &Opt) -> Result<(ReloadHandle, Option)> { let logging_targets = vec![ - ("ant_bootstrap".to_string(), Level::DEBUG), + ("ant_bootstrap".to_string(), Level::INFO), ("ant_build_info".to_string(), Level::TRACE), ("ant_evm".to_string(), Level::TRACE), ("ant_networking".to_string(), Level::INFO),