-
Notifications
You must be signed in to change notification settings - Fork 912
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: config additions #5136
feat: config additions #5136
Conversation
lightningd/options.c
Outdated
@@ -1117,6 +1137,9 @@ static void register_opts(struct lightningd *ld) | |||
opt_register_arg("--announce-addr", opt_add_announce_addr, NULL, | |||
ld, | |||
"Set an IP address (v4 or v6) or .onion v3 to announce, but not listen on"); | |||
opt_register_noarg("--disable-ip-discovery", opt_set_invbool, | |||
&ld->config.announce_discovered_ip, | |||
"Turn off address announcement of detected public IP"); |
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.
Just a note: I usually prefer positive options, not negative, with the default being !ld->always_use_proxy
.
In theory always-use-proxy could be a normal SOCKS proxy, and for all we know you've set up a reverse tunnel. But that's a really weird case (and you can just advertize an explicit IP for that).
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.
Hm, if I make it a positive bool option, then ip announcement can't be enabled by default, otherwise the switch would do nothing. Or do I get somthing wrong? What I could do is rename the internal code variables also to disable_ip_discovery
which defaults to false
and use an opt_set_bool
instead of opt_set_invbool
. Do you meant that?
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 renamed the internal variable also to disable_ip_discovery
defaulting to false
. This is now a switch, not an bool option. The switch effectively turns of ip discovery anouncements by using opt_set_bool
instead of opt_set_invbool
.
Can you re-check?
You need to add the names to the doc/schemas/listconfig.schema.json file too... |
0768ffc
to
5fce184
Compare
This adds config and commandline options for htlc_min_msat, htlc_max_msat and announce_discovered_ip. The default is 0msat for htlc_min_msat, unlimited for htlc_max_msat and enabled for announce_discovered_ip. The announce_discovered_ip gets the disable commandline switch --disable-ip-discovery Changelog-added: Config options for htlc_min_msat, htlc_max_msat and announce_discovered_ip.
7a745fd
to
5996ca7
Compare
doc/schemas: adds htlc min/max and ip discovery
5996ca7
to
084a717
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.
ACK 0f25b7b
I put this in the config, and it says
But passing it on the command line is okay. |
That's because it's a switch and not an argument. Try without |
This adds config and commanline switches for HTLC min/max values and announcement of auto discovered IPs