mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Various corrections pre-testnet (#1019)
* Correct sync log messaging * Modify syncing logs * Update discv5 bug * Discv5 patch * Re-word sync status message * Correct discovery peer finding logic * Remove debugging log * Remove duplicates in CLI * Correct fmt
This commit is contained in:
@@ -148,6 +148,15 @@ impl<TSpec: EthSpec> PeerDB<TSpec> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns if the peer is already connected.
|
||||
pub fn is_connected(&self, peer_id: &PeerId) -> bool {
|
||||
if let PeerConnectionStatus::Connected { .. } = self.connection_status(peer_id) {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
/* Setters */
|
||||
|
||||
/// Sets a peer as connected with an ingoing connection
|
||||
|
||||
Reference in New Issue
Block a user