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.
Description
Remove the
PollParameterstrait.local_peer_idcan be removed in favor of users having to pass it into their behaviour in the constructor.external_addressescan be built up from theinject_new_external_addrandinject_expired_external_addrcallbacks.listened_addressescan be built up from theinject_new_listen_addrandinject_expired_listen_addrcallbacksThe 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-libp2pis primarily designed around an async message-passing system. Accessing information synchronously as part of thepollfunction is not inline with this philosophy.Current Implementation
Are you planning to do it yourself in a pull request?
Maybe.