-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add GossipParam tests and fix a few small issues #232
Conversation
jtraglia
commented
Mar 3, 2022
- For gossipFactor, there was a range mismatch.
- For graylistThreshold, the message said "gossipThreshold" instead.
- The others checked >= or <= but the message said > or <.
* For gossipFactor, there was a range mismatch. * For graylistThreshold, the message said "gossipThreshold" instead. * The others checked >= or <= but the message said > or <.
Before merging this, please look at #233. It is possible that the error messages were correct. |
Right now I've only added gossip score tests. I will add other tests next; those should be easier.
Also added check to make sure these values are >= 0. Also modified graylistThreshold error message to better match other messages.
Sorry this branch evolved into something else. Changing the name to reflect that. |
To be exhaustive, should I add negative checks to other values that should never be negative? For example all of the durations. It feels like it could be too much. |
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.
LGTM. I could see it being reasonable for graylistThreshold, publishThreshold and gossipThreashold to be equal but given the spec says less than that works even if it isn't always entirely consistent about it.