Skip to content
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(iroh-net): Expose DNS resolver #2262

Merged
merged 7 commits into from
May 3, 2024
Merged

feat(iroh-net): Expose DNS resolver #2262

merged 7 commits into from
May 3, 2024

Conversation

Frando
Copy link
Member

@Frando Frando commented May 2, 2024

Description

  • allow to set a custom DNS resolver in the node builder
  • slight refactor of pkarr/dns test utils
  • add test using test servers for node discovery to iroh

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@Frando Frando marked this pull request as draft May 2, 2024 17:07
@Frando Frando force-pushed the feat/expose-dns-resolver branch from 1d6abdc to f1b0418 Compare May 2, 2024 22:20
@Frando Frando marked this pull request as ready for review May 3, 2024 07:32
@Frando Frando requested review from flub and dignifiedquire May 3, 2024 07:56
nameserver: SocketAddr,
node_origin: &str,
pkarr_relay: &Url,
relay_map: &RelayMap,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change this to a reference if it then immediately clones it? by keeping it as owned it's more obvious to the caller what happens to it and they get to do the clone, if needed, explicitly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i guess this is just a test util. but still, i find that an odd pattern even if it is for tests. if you really like the convenience of calling it with borrowed data maybe using a generic with Clone or ToOwned is better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree in general but thought for a test only util it's ok and makes writing tests a bit simpler IMO. But no strong opinion, can also change back to take by value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i approved anyway as i noticed it's a test. up to you

Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!

@Frando Frando added this pull request to the merge queue May 3, 2024
Merged via the queue into main with commit 6504727 May 3, 2024
21 checks passed
@dignifiedquire dignifiedquire deleted the feat/expose-dns-resolver branch May 3, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants