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

peer: Rework version negotiation. #1250

Merged
merged 1 commit into from
Jun 4, 2018

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jun 3, 2018

This requires PR #1248.

This modifies the negotiation logic to ensure the callback has the opportunity to see the message before the peer is disconnected and improves the error handling when reading the remote version message.

It also has the side effect of ensuring the protocol version is negotiated before sending reject messages with the exception of the first message not being a version message since negotiation is not possible in that case.

This is being changed because it is useful for the server to see the message regardless in order to have the opportunity to things such as update the address manager and reject peers that don't have desired services.

@davecgh davecgh changed the title Peer rework version negotiation peer: Rework version negotiation. Jun 3, 2018
@davecgh davecgh added this to the 1.3.0 milestone Jun 4, 2018
@davecgh davecgh force-pushed the peer_rework_version_negotiation branch 3 times, most recently from cc2be16 to ebdcd6d Compare June 4, 2018 16:44
This modifies the negotiation logic to ensure the callback has the
opportunity to see the message before the peer is disconnected and
improves the error handling when reading the remote version message.

It also has the side effect of ensuring the protocol version is
negotiated before sending reject messages with the exception of the
first message not being a version message since negotiation is not
possible in that case.

This is being changed because it is useful for the server to see the
message regardless in order to have the opportunity to things such as
update the address manager and reject peers that don't have desired
services.
@davecgh davecgh force-pushed the peer_rework_version_negotiation branch from ebdcd6d to 7741392 Compare June 4, 2018 20:36
@davecgh davecgh merged commit 7741392 into decred:master Jun 4, 2018
@davecgh davecgh deleted the peer_rework_version_negotiation branch June 4, 2018 20:59
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

Successfully merging this pull request may close these issues.

3 participants