-
Notifications
You must be signed in to change notification settings - Fork 20
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
P2P: move seed nodes to config #306
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -104,12 +104,12 @@ where | |||||
clippy::significant_drop_tightening | ||||||
)] | ||||||
async fn connect_to_random_seeds(&mut self) -> Result<(), OutboundConnectorError> { | ||||||
let seeds = N::SEEDS.choose_multiple(&mut thread_rng(), MAX_SEED_CONNECTIONS); | ||||||
let seeds = self | ||||||
.config | ||||||
.seeds | ||||||
.choose_multiple(&mut thread_rng(), MAX_SEED_CONNECTIONS); | ||||||
|
||||||
assert!( | ||||||
seeds.len() != 0, | ||||||
"No seed nodes available to get peers from" | ||||||
); | ||||||
assert_ne!(seeds.len(), 0, "No seed nodes available to get peers from"); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: https://rust-lang.github.io/rust-clippy/master/index.html#/len_zero
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
||||||
let mut allowed_errors = seeds.len(); | ||||||
|
||||||
|
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.
Doesn't removing this mean users will have to manually provide seed nodes?
Will there eventually be default seed nodes added to the
P2PConfig
?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.
Users as in devs using
cuprate-p2p
? yes.Users as in people using
cuprated
? no.in #304 I am creating the config that will be exposed to
cuprated
users in there there will be default seed nodes