mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-02 22:22:15 +00:00
Commit 335e55e6 removed the `ConnectionInfo` trait in favor of `PeerId`s. Commit 1bd013c8 removed `ExpandedSwarm::connection_info` as it would only return the `PeerId` that the caller is already aware of. One could use `ExpandedSwarm::connection_info` not only to retrieve the `ConnectionInfo` for a given peer, but also to check whether the underlying `Network` has a connection to the peer. This commit exposes the `is_connected` method on `Network` via `ExpandedSwarm` to check whether the `Network` has an established connection to a given peer.