-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Disable compression by p2p #3655
base: master
Are you sure you want to change the base?
Conversation
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.
We can add a configuration to disable local compression immediately, this is backwards-compatible (and make it send the new attribute in the subsequent version).
src/Neo/Network/P2P/Capabilities/DisableCompressionCapability.cs
Outdated
Show resolved
Hide resolved
src/Neo/Network/P2P/Capabilities/DisableCompressionCapability.cs
Outdated
Show resolved
Hide resolved
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.
Your missing ProtocolSettings
.
Where? |
@@ -209,9 +209,14 @@ private void OnStartProtocol() | |||
new FullNodeCapability(NativeContract.Ledger.CurrentIndex(system.StoreView)) | |||
}; | |||
|
|||
if (!localNode.EnableCompression) | |||
{ | |||
capabilities.Add(new DisableCompressionCapability()); |
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.
A bit aggressive (will break in mixed node scenario), but likely not a problem in real life (old versions to be phased out quickly after HF and this attribute is not expected to be used often).
Description
Step 1 of #2626, add node capability for disable compression
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: