-
Notifications
You must be signed in to change notification settings - Fork 220
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
fix: remove use of hardcoded value (see issue #4451) #4485
fix: remove use of hardcoded value (see issue #4451) #4485
Conversation
Fixes: #4451. |
@@ -91,7 +91,7 @@ impl OnConnect { | |||
.connectivity | |||
.ban_peer_until( | |||
conn.peer_node_id().clone(), | |||
Duration::from_secs(60 * 60), | |||
Duration::from_secs(DURATION_SYNC_PEERS), |
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.
Dont make it a const, take it from the config, there is a config settings, ban_short_duration
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.
Great! I add this config value. Much better now :)
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.
Making a const is better practice, but its a hardcoded value
Remove |
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
Description
--- Remove the use of hard-coded value here.
Motivation and Context
Fixes #4451
How Has This Been Tested?
--- Manually.