This repository was archived by the owner on Jul 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 146
Allow Ping, Pong, Disconnect Messages snappy compressible #171
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6da7085
to
73d842e
Compare
@veox could you please apply this PR locally and then run it for some time (If I am not wrong, a solid 5 minutes should do), and let me know if the same errors are occurring. |
pipermerriam
approved these changes
Jan 15, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Structurally this looks 👍
Sounds like a 👍 from @veox or at least someone verifying that this does indeed fix the parity issue would be desired.
Yes, |
veox
reviewed
Jan 15, 2019
Works as expected. |
@pipermerriam this can be merged I guess. |
3 tasks
@Bhargavasomu In issue description, please change Issue #169 to Fixes #169 to use a bit of automation. ^_^ |
LGTM, merging to prepare for release of #174 |
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
Previously
Ping, Pong, Disconnect messages
weren'tsnappy compressible/decompressible
by Trinity. But the other clients havecompressed
the messages coming out of those commands (If both our client and the other one have agreed on snappy compression).Fixes #169
How was it fixed?
The
base_protocol
of the peer is initially created withsnappy_support
set to false. But after the handshake, when both of the clients agree on usingsnappy compression
, then thebase_protocol
variable of the peer is recreated by setting thesnappy_support
variable toTrue
. Further details can be seen in the code.Cute Animal Picture