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

support external address in discv4 handle type #4222

Closed
mattsse opened this issue Aug 16, 2023 · 0 comments · Fixed by #4268
Closed

support external address in discv4 handle type #4222

mattsse opened this issue Aug 16, 2023 · 0 comments · Fixed by #4268
Labels
A-discv4 Related to discv4 discovery C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Aug 16, 2023

Describe the feature

currently the shared local address is constant

/// The address of the udp socket
local_addr: SocketAddr,

this should also support the external IP:

pub fn set_external_ip_addr(&mut self, external_ip: IpAddr) {
if self.local_node_record.address != external_ip {
debug!(target : "discv4", ?external_ip, "Updating external ip");
self.local_node_record.address = external_ip;
let _ = self.local_eip_868_enr.set_ip(external_ip, &self.secret_key);
debug!(target : "discv4", enr=?self.local_eip_868_enr, "Updated local ENR");
}
}

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-discv4 Related to discv4 discovery C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant