-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
discovery: allow DNS seeds to be overwritten #4744
Conversation
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.
Looks pretty good to me, one comment re the fall back addresses.
lncfg/chain.go
Outdated
@@ -21,4 +21,5 @@ type Chain struct { | |||
BaseFee lnwire.MilliSatoshi `long:"basefee" description:"The base fee in millisatoshi we will charge for forwarding payments on our channels"` | |||
FeeRate lnwire.MilliSatoshi `long:"feerate" description:"The fee rate used when forwarding payments on our channels. The total fee charged is basefee + (amount * feerate / 1000000), where amount is the forwarded amount."` | |||
TimeLockDelta uint32 `long:"timelockdelta" description:"The CLTV delta we will subtract from a forwarded HTLC's timelock value"` | |||
DNSSeeds []string `long:"dnsseed" description:"The seed DNS server(s) to use for initial peer discovery. Can be specified multiple times, will overwrite the default seed servers."` |
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.
How do we want to handle the fall back SOA address? FWIW, it's a hack we use to allow people to do the SRV requests over Tor using direct TCP DNS resolution, and isn't actually in the spec.
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.
It'll just skip the SOA address if none was specified:
if dnsSeedTuple[1] == "" {
log.Tracef("DNS seed %v has no secondary, "+
"skipping fallback", primarySeed)
continue
}
So non-Tor users probably don't need to specify one. I added the possibility to specify a primary and SOA fallback address as a comma separated pair.
1746c2b
to
0804240
Compare
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.
LGTM 🍰
Fixes #3817.
Need to manually test on testnet, but should be pretty straightforward.