Adds a workaround for peer manager integration (#1003)

This commit is contained in:
Age Manning
2020-04-14 20:32:03 +10:00
committed by GitHub
parent e5874f4565
commit be7aaa3dbe
5 changed files with 106 additions and 90 deletions

View File

@@ -140,7 +140,7 @@ impl<TSpec: EthSpec> PeerDB<TSpec> {
.map(|(id, _)| id)
}
/// Gets the connection status of the peer.
/// Returns the peer's connection status. Returns unknown if the peer is not in the DB.
pub fn connection_status(&self, peer_id: &PeerId) -> PeerConnectionStatus {
self.peer_info(peer_id)
.map_or(PeerConnectionStatus::default(), |info| {