Skip to content

Commit

Permalink
fix(discv5): warning discv5 config socket override (paradigmxyz#12636)
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane authored Nov 18, 2024
1 parent 8aa9b71 commit 55b5136
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions crates/net/discv5/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,13 @@ pub fn discv5_sockets_wrt_rlpx_addr(
discv5_addr_ipv6.map(|ip| SocketAddrV6::new(ip, discv5_port_ipv6, 0, 0));

if let Some(discv5_addr) = discv5_addr_ipv4 {
warn!(target: "net::discv5",
%discv5_addr,
%rlpx_addr,
"Overwriting discv5 IPv4 address with RLPx IPv4 address, limited to one advertised IP address per IP version"
);
if discv5_addr != rlpx_addr {
warn!(target: "net::discv5",
%discv5_addr,
%rlpx_addr,
"Overwriting discv5 IPv4 address with RLPx IPv4 address, limited to one advertised IP address per IP version"
);
}
}

// overwrite discv5 ipv4 addr with RLPx address. this is since there is no
Expand All @@ -429,11 +431,13 @@ pub fn discv5_sockets_wrt_rlpx_addr(
discv5_addr_ipv4.map(|ip| SocketAddrV4::new(ip, discv5_port_ipv4));

if let Some(discv5_addr) = discv5_addr_ipv6 {
warn!(target: "net::discv5",
%discv5_addr,
%rlpx_addr,
"Overwriting discv5 IPv6 address with RLPx IPv6 address, limited to one advertised IP address per IP version"
);
if discv5_addr != rlpx_addr {
warn!(target: "net::discv5",
%discv5_addr,
%rlpx_addr,
"Overwriting discv5 IPv6 address with RLPx IPv6 address, limited to one advertised IP address per IP version"
);
}
}

// overwrite discv5 ipv6 addr with RLPx address. this is since there is no
Expand Down

0 comments on commit 55b5136

Please sign in to comment.