Skip to content

swarm: Remove PollParameters #3124

@thomaseizinger

Description

@thomaseizinger

Description

Remove the PollParameters trait.

  • local_peer_id can be removed in favor of users having to pass it into their behaviour in the constructor.
  • external_addresses can be built up from the inject_new_external_addr and inject_expired_external_addr callbacks.
  • listened_addresses can be built up from the inject_new_listen_addr and inject_expired_listen_addr callbacks

The only function that does not have a replacement at the moment is supported_protocols.

Any ideas for how we could model that one differently?

As per usual, we should first deprecate the existing functions, give users a release or two to upgrade and then remove the deprecated code.

Motivation

rust-libp2p is primarily designed around an async message-passing system. Accessing information synchronously as part of the poll function is not inline with this philosophy.

Current Implementation

Are you planning to do it yourself in a pull request?

Maybe.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions