-
Notifications
You must be signed in to change notification settings - Fork 171
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
test: add test for iroh-dns-server with mainline #2250
Conversation
8a6343a
to
19fb463
Compare
iroh-dns-server/src/config.rs
Outdated
/// Set custom bootstrap nodes. | ||
/// | ||
/// If empty this will use the default bittorrent mainline bootstrap nodes as defined by pkarr. | ||
pub bootstrap: Vec<SocketAddr>, |
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.
OK, glad we got something else to put into the mainline config section...
iroh-dns-server/src/config.rs
Outdated
Self { enabled: false } | ||
Self { | ||
enabled: false, | ||
bootstrap: vec![], |
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.
Empty means default? How do you get the default mainline bootstrap nodes?
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.
I know it is annoying, but can we make this an enum Default/Custom instead of using empty as "use the defaults"?
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.
Changed it to an enum. Not in the config struct, because I think it makes the toml structure more complicated, but in the option passed to the store.
iroh-dns-server/src/store.rs
Outdated
} else { | ||
let bootstrap = bootstrap | ||
.iter() | ||
.map(|addr| addr.to_string()) |
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.
Can these be URLs, or why does pkarr require strings here? Hopefully that can be changed in pkarr 2.0
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.
Good point. I misread the pkarr source - these can be either "ip:port" or "domain:port" strings. changed to use strings on our end as well.
Description
This adds a test for iroh-dns-server with mainline fallback resolution.
Needed to rework the config structure a little to not duplicate code too much.
Breaking Changes
are documented in #2188
Notes & open questions
Change checklist