-
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
Conversation
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 comment
The 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
assert_ne!(seeds.len(), 0, "No seed nodes available to get peers from"); | |
assert!(!seeds.is_empty(), "No seed nodes available to get peers from"); |
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.
seeds
is a type which doesn't have a is_empty
stable: https://doc.rust-lang.org/nightly/core/iter/traits/exact_size/trait.ExactSizeIterator.html#method.is_empty
const SEEDS: &'static [Self::Addr] = &[ | ||
ip_v4(176, 9, 0, 187, 18080), | ||
ip_v4(88, 198, 163, 90, 18080), | ||
ip_v4(66, 85, 74, 134, 18080), | ||
ip_v4(51, 79, 173, 165, 18080), | ||
ip_v4(192, 99, 8, 110, 18080), | ||
ip_v4(37, 187, 74, 171, 18080), | ||
ip_v4(77, 172, 183, 193, 18080), | ||
]; |
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.
Doesn't removing this mean users will have to manually provide seed nodes?
Users as in devs using cuprate-p2p
? yes.
Users as in people using cuprated
? no.
Will there eventually be default seed nodes added to the P2PConfig?
in #304 I am creating the config that will be exposed to cuprated
users in there there will be default seed nodes
d0d80dd
to
7c09a37
Compare
What
Moves the seed nodes to the config + removes a few unused constants
Why
Seeds nodes depend on the network.