-
Notifications
You must be signed in to change notification settings - Fork 941
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swarm: Add ExpandedSwarm::is_connected (#1862)
Commit 335e55e removed the `ConnectionInfo` trait in favor of `PeerId`s. Commit 1bd013c 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.
- Loading branch information
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters