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

config: fix AddrFactory for AutoNAT #2868

Merged
merged 3 commits into from
Jul 31, 2024
Merged

config: fix AddrFactory for AutoNAT #2868

merged 3 commits into from
Jul 31, 2024

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Jul 8, 2024

We need the address factory before it's modified by autorelay

@sukunrt sukunrt marked this pull request as draft July 8, 2024 14:57
@sukunrt sukunrt force-pushed the addrfactory-fix branch 3 times, most recently from 503f91b to b8d0297 Compare July 21, 2024 07:58
@sukunrt sukunrt marked this pull request as ready for review July 21, 2024 08:57
@sukunrt sukunrt requested a review from MarcoPolo July 21, 2024 08:57
@sukunrt sukunrt mentioned this pull request Jul 22, 2024
19 tasks
Copy link
Collaborator

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

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

I pushed a commit of just a couple nits.

config/config.go Outdated
fx.Invoke(func(h *bhost.BasicHost, lifecycle fx.Lifecycle) (*autorelay.AutoRelay, error) {
// oldAddrFactory is the AddrFactory before it's modified by autorelay
// we need this for checking reachability via autonat
oldAddrFactory := func(addrs []ma.Multiaddr) []ma.Multiaddr {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's a bike shed, but slight preference for originalAddrFactory

Copy link
Collaborator

Choose a reason for hiding this comment

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

I pushed a commit to that effect.

@sukunrt sukunrt merged commit f80d18f into master Jul 31, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants