Skip to content

Commit

Permalink
Extend the test showcasing impossibility of dialing self by ip.
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Ermolaev committed Jan 25, 2024
1 parent b8b9391 commit 4d8337d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions swarm/src/lib.rs
Expand Up @@ -2245,6 +2245,8 @@ mod tests {
multiaddr![Ip4([0, 0, 0, 0]), Tcp(rand::random::<u16>())],
multiaddr![Ip4([0, 0, 0, 0]), Tcp(rand::random::<u16>())],
multiaddr![Ip4([0, 0, 0, 0]), Tcp(rand::random::<u16>())],
multiaddr![Ip4([127, 0, 0, 1]), Tcp(rand::random::<u16>())],
multiaddr![Ip6([0, 0, 0, 0, 0, 0, 0, 1]), Tcp(rand::random::<u16>())],
multiaddr![Udp(rand::random::<u16>())],
multiaddr![Udp(rand::random::<u16>())],
multiaddr![Udp(rand::random::<u16>())],
Expand All @@ -2270,6 +2272,7 @@ mod tests {
assert_eq!(target, peer_id.unwrap());

let failed_addresses = errors.into_iter().map(|(addr, _)| addr).collect::<Vec<_>>();
println!("{failed_addresses:?}");
let expected_addresses = addresses
.into_iter()
.map(|addr| addr.with(multiaddr::Protocol::P2p(target)))
Expand Down

0 comments on commit 4d8337d

Please sign in to comment.