mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +00:00
Discovery patch (#2382)
* Upgrade libp2p and unstable gossip * Network protocol upgrades * Correct dependencies, reduce incoming bucket limit * Clean up dirty DHT entries before repopulating * Update cargo lock * Update lockfile * Update ENR dep * Update deps to specific versions * Update test dependencies * Update docker rust, and remote signer tests * More remote signer test fixes * Temp commit * Update discovery * Remove cached enrs after dialing * Increase the session capacity, for improved efficiency
This commit is contained in:
@@ -580,10 +580,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
// ENR's may have multiple Multiaddrs. The multi-addr associated with the UDP
|
||||
// port is removed, which is assumed to be associated with the discv5 protocol (and
|
||||
// therefore irrelevant for other libp2p components).
|
||||
let mut out_list = enr.multiaddr();
|
||||
out_list.retain(|addr| !addr.iter().any(|v| matches!(v, MProtocol::Udp(_))));
|
||||
|
||||
out_list
|
||||
enr.multiaddr_tcp()
|
||||
} else {
|
||||
// PeerId is not known
|
||||
Vec::new()
|
||||
@@ -674,6 +671,8 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
.collect();
|
||||
for peer_id in &peers_to_dial {
|
||||
debug!(self.log, "Dialing cached ENR peer"; "peer_id" => %peer_id);
|
||||
// Remove the ENR from the cache to prevent continual re-dialing on disconnects
|
||||
self.discovery.remove_cached_enr(&peer_id);
|
||||
self.dial_peer(peer_id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user