Remove the logic allowing lighthouse to update it's own ENR (#682)

* Set random port when zero-port option is set

* Remove logic allowing lighthouse to update its own ENR

* Discovery address is set to localhost by default

* Return error if discovery-addr isn't explicit
This commit is contained in:
Pawan Dhananjay
2020-01-03 10:07:05 +05:30
committed by Age Manning
parent 647034b637
commit 7320f8497f
4 changed files with 63 additions and 67 deletions

View File

@@ -254,11 +254,6 @@ impl<TSubstream: AsyncRead + AsyncWrite> Behaviour<TSubstream> {
pub fn peer_unbanned(&mut self, peer_id: &PeerId) {
self.discovery.peer_unbanned(peer_id);
}
/// Informs the discovery behaviour if a new IP/Port is set at the application layer
pub fn update_local_enr_socket(&mut self, socket: std::net::SocketAddr, is_tcp: bool) {
self.discovery.update_local_enr(socket, is_tcp);
}
}
/// The types of events than can be obtained from polling the behaviour.