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:
Age Manning
2020-04-19 20:45:25 +10:00
committed by GitHub
parent 7b86c9a08f
commit 489ad90536
9 changed files with 176 additions and 176 deletions

View File

@@ -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