Update discv5 to expand ipv6 support (#4319)

Done in different PRs so that they can reviewed independently, as it's likely this won't be merged before I leave

Includes resolution for #4080 
- [ ] #4299
- [ ] #4318
- [ ] #4320 

Co-authored-by: Diva M <divma@protonmail.com>
Co-authored-by: Age Manning <Age@AgeManning.com>
This commit is contained in:
Divma
2023-06-13 01:25:05 +00:00
parent 62a2413ade
commit 2639e67e90
12 changed files with 425 additions and 170 deletions

View File

@@ -39,7 +39,7 @@ impl CommandLineTest {
}
fn run_with_ip(&mut self) -> CompletedTest<BootNodeConfigSerialization> {
self.cmd.arg(IP_ADDRESS);
self.cmd.arg("--enr-address").arg(IP_ADDRESS);
self.run()
}
}
@@ -67,7 +67,13 @@ fn port_flag() {
.flag("port", Some(port.to_string().as_str()))
.run_with_ip()
.with_config(|config| {
assert_eq!(config.listen_socket.port(), port);
assert_eq!(
config
.ipv4_listen_socket
.expect("Bootnode should be listening on IPv4")
.port(),
port
);
})
}
@@ -78,7 +84,13 @@ fn listen_address_flag() {
.flag("listen-address", Some("127.0.0.2"))
.run_with_ip()
.with_config(|config| {
assert_eq!(config.listen_socket.ip(), addr);
assert_eq!(
config
.ipv4_listen_socket
.expect("Bootnode should be listening on IPv4")
.ip(),
&addr
);
});
}