mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Correct multiple dial bug (#5113)
* Dialing the same peer-id error fix * Improve dialing logging * Update beacon_node/lighthouse_network/src/peer_manager/mod.rs Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com> --------- Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
@@ -1161,9 +1161,11 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
|
||||
|
||||
// Remove the ENR from the cache to prevent continual re-dialing on disconnects
|
||||
for enr in peers_to_dial {
|
||||
debug!(self.log, "Dialing cached ENR peer"; "peer_id" => %enr.peer_id());
|
||||
self.discovery_mut().remove_cached_enr(&enr.peer_id());
|
||||
self.peer_manager_mut().dial_peer(enr);
|
||||
let peer_id = enr.peer_id();
|
||||
if self.peer_manager_mut().dial_peer(enr) {
|
||||
debug!(self.log, "Dialing cached ENR peer"; "peer_id" => %peer_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user