-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(cli): add max peer args #4024
Conversation
Codecov Report
... and 13 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
ty, this is correct,
just have some style nits for the builder fns here
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.
last nit
bin/reth/src/args/network_args.rs
Outdated
let mut peer_config = config.peers.clone(); | ||
if let Some(max_inbound_peers) = self.max_inbound_peers { | ||
peer_config = peer_config.with_max_inbound(max_inbound_peers); | ||
} | ||
if let Some(max_inbound_peers) = self.max_outbound_peers { | ||
peer_config = peer_config.with_max_outbound(max_inbound_peers); | ||
} | ||
peer_config = peer_config.with_max_inbound_opt(self.max_inbound_peers); | ||
peer_config = peer_config.with_max_outbound_opt(self.max_outbound_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.
nit: these can be chained:
let peer_config = config.peers.clone().with_().with()
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.
Thanks for the review, updated!
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.
nice work
Fixes #3990