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

request-response: Inconsistent documentation. #5372

Open
vnermolaev opened this issue May 10, 2024 · 0 comments
Open

request-response: Inconsistent documentation. #5372

vnermolaev opened this issue May 10, 2024 · 0 comments

Comments

@vnermolaev
Copy link
Contributor

Summary

As part of PR #4371, methods request_response::Behaviour::add_address and request_response::Behaviour::remove_address have been deprecated however in the master branch it says that

    /// Initiates sending a request.
    /// ...
    /// > **Note**: In order for such a dialing attempt to succeed,
    /// > the `RequestResonse` protocol must either be embedded
    /// > in another `NetworkBehaviour` that provides peer and
    /// > address discovery, or known addresses of peers must be
    /// > managed via [`Behaviour::add_address`] and
    /// > [`Behaviour::remove_address`].
    pub fn send_request(&mut self, peer: &PeerId, request: TCodec::Request) -> OutboundRequestId { ...

IMO, this note is obsolete and should be removed.

Expected behavior

Documentation should not mislead.

Actual behavior

Documentation misleads into using deprecated methods.

Relevant log output

No response

Possible Solution

Correct the docstring.

Version

No response

Would you like to work on fixing this bug ?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant