Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarm: Add ExpandedSwarm::is_connected #1862

Merged
merged 2 commits into from
Nov 26, 2020
Merged

Commits on Nov 26, 2020

  1. swarm: Add ExpandedSwarm::is_connected

    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.
    mxinden committed Nov 26, 2020
    Configuration menu
    Copy the full SHA
    3116096 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    63fad5a View commit details
    Browse the repository at this point in the history