Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: filter p2p circuit addr inside bootstrap cache #2570

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ant-bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Multiaddr> {
if addr
.iter()
.any(|protocol| matches!(&protocol, Protocol::P2pCircuit))
{
return None;
}

let peer_id = addr
.iter()
.find(|protocol| matches!(protocol, Protocol::P2p(_)));
Expand Down
2 changes: 1 addition & 1 deletion ant-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async fn main() -> Result<()> {

fn init_logging_and_metrics(opt: &Opt) -> Result<(ReloadHandle, Option<WorkerGuard>)> {
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),
Expand Down
Loading