Skip to content

Commit b9270c5

Browse files
committed
lightningd: listconfigs update, using configvars code.
listconfigs is convenient, but it doesn't handle multi-options well: it outputs an object with duplicate fields in this case (e.g. log-file), nor is it extensible to show more than raw values. However, listconfigs doesn't do what other list commands do (use a sub-object "configs") so we can put the new values under that. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: JSON-RPC: `listconfigs` now has `configs` subobject with more information about each config option.
1 parent f1e994a commit b9270c5

File tree

6 files changed

+1746
-12
lines changed

6 files changed

+1746
-12
lines changed

doc/lightning-listconfigs.7.md

Lines changed: 222 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,226 @@ RETURN VALUE
3535
[comment]: # (GENERATE-FROM-SCHEMA-START)
3636
On success, an object is returned, containing:
3737

38+
- **configs** (object, optional) *(added v23.08)*:
39+
- **conf** (object, optional):
40+
- **value\_str** (string): field from cmdline
41+
- **source** (string): source of configuration setting (always "cmdline")
42+
- **clear-plugins** (object, optional):
43+
- **set** (boolean): `true` if set in config or cmdline
44+
- **source** (string): source of configuration setting
45+
- **disable-mpp** (object, optional):
46+
- **set** (boolean): `true` if set in config or cmdline
47+
- **source** (string): source of configuration setting
48+
- **mainnet** (object, optional):
49+
- **set** (boolean): `true` if set in config or cmdline
50+
- **source** (string): source of configuration setting
51+
- **regtest** (object, optional):
52+
- **set** (boolean): `true` if set in config or cmdline
53+
- **source** (string): source of configuration setting
54+
- **signet** (object, optional):
55+
- **set** (boolean): `true` if set in config or cmdline
56+
- **source** (string): source of configuration setting
57+
- **testnet** (object, optional):
58+
- **set** (boolean): `true` if set in config or cmdline
59+
- **source** (string): source of configuration setting
60+
- **important-plugin** (object, optional):
61+
- **values\_str** (array of strings):
62+
- field from config or cmdline
63+
- **sources** (array of strings):
64+
- source of configuration setting
65+
- **plugin** (object, optional):
66+
- **values\_str** (array of strings):
67+
- field from config or cmdline
68+
- **sources** (array of strings):
69+
- source of configuration setting
70+
- **plugin-dir** (object, optional):
71+
- **values\_str** (array of strings):
72+
- field from config or cmdline
73+
- **sources** (array of strings):
74+
- source of configuration setting
75+
- **lightning-dir** (object, optional):
76+
- **value\_str** (string): field from config or cmdline, or default
77+
- **source** (string): source of configuration setting
78+
- **network** (object, optional):
79+
- **value\_str** (string): field from config or cmdline, or default (can also be changed by `testnet`, `signet`, `regtest` options!)
80+
- **source** (string): source of configuration setting
81+
- **allow-deprecated-apis** (object, optional):
82+
- **value\_bool** (boolean): field from config or cmdline, or default
83+
- **source** (string): source of configuration setting
84+
- **rpc-file** (object, optional):
85+
- **value\_str** (string): field from config or cmdline, or default
86+
- **source** (string): source of configuration setting
87+
- **disable-plugin** (object, optional):
88+
- **values\_str** (array of strings):
89+
- field from config or cmdline
90+
- **sources** (array of strings):
91+
- source of configuration setting
92+
- **always-use-proxy** (object, optional):
93+
- **value\_bool** (boolean): field from config or cmdline, or default
94+
- **source** (string): source of configuration setting
95+
- **daemon** (object, optional):
96+
- **set** (boolean): `true` if set in config or cmdline
97+
- **source** (string): source of configuration setting
98+
- **wallet** (object, optional):
99+
- **value\_str** (string): field from config or cmdline, or default
100+
- **source** (string): source of configuration setting
101+
- **large-channels** (object, optional):
102+
- **set** (boolean): `true` if set in config or cmdline
103+
- **source** (string): source of configuration setting
104+
- **experimental-dual-fund** (object, optional):
105+
- **set** (boolean): `true` if set in config or cmdline
106+
- **source** (string): source of configuration setting
107+
- **experimental-onion-messages** (object, optional):
108+
- **set** (boolean): `true` if set in config or cmdline
109+
- **source** (string): source of configuration setting
110+
- **experimental-offers** (object, optional):
111+
- **set** (boolean): `true` if set in config or cmdline
112+
- **source** (string): source of configuration setting
113+
- **experimental-shutdown-wrong-funding** (object, optional):
114+
- **set** (boolean): `true` if set in config or cmdline
115+
- **source** (string): source of configuration setting
116+
- **experimental-websocket-port** (object, optional):
117+
- **value\_int** (u32): field from config or cmdline, or default
118+
- **source** (string): source of configuration setting
119+
- **experimental-peer-storage** (object, optional) *(added v23.02)*:
120+
- **set** (boolean): `true` if set in config or cmdline
121+
- **source** (string): source of configuration setting
122+
- **database-upgrade** (object, optional):
123+
- **value\_bool** (boolean): field from config or cmdline, or default
124+
- **source** (string): source of configuration setting
125+
- **rgb** (object, optional):
126+
- **value\_str** (hex): field from config or cmdline, or default (always 6 characters)
127+
- **source** (string): source of configuration setting
128+
- **alias** (object, optional):
129+
- **value\_str** (string): field from config or cmdline, or default
130+
- **source** (string): source of configuration setting
131+
- **pid-file** (object, optional):
132+
- **value\_str** (string): field from config or cmdline, or default
133+
- **source** (string): source of configuration setting
134+
- **ignore-fee-limits** (object, optional):
135+
- **value\_bool** (boolean): field from config or cmdline, or default
136+
- **source** (string): source of configuration setting
137+
- **watchtime-blocks** (object, optional):
138+
- **value\_int** (u32): field from config or cmdline, or default
139+
- **source** (string): source of configuration setting
140+
- **max-locktime-blocks** (object, optional):
141+
- **value\_int** (u32): field from config or cmdline, or default
142+
- **source** (string): source of configuration setting
143+
- **funding-confirms** (object, optional):
144+
- **value\_int** (u32): field from config or cmdline, or default
145+
- **source** (string): source of configuration setting
146+
- **cltv-delta** (object, optional):
147+
- **value\_int** (u32): field from config or cmdline, or default
148+
- **source** (string): source of configuration setting
149+
- **cltv-final** (object, optional):
150+
- **value\_int** (u32): field from config or cmdline, or default
151+
- **source** (string): source of configuration setting
152+
- **commit-time** (object, optional):
153+
- **value\_int** (u32): field from config or cmdline, or default
154+
- **source** (string): source of configuration setting
155+
- **fee-base** (object, optional):
156+
- **value\_int** (u32): field from config or cmdline, or default
157+
- **source** (string): source of configuration setting
158+
- **rescan** (object, optional):
159+
- **value\_int** (integer): field from config or cmdline, or default
160+
- **source** (string): source of configuration setting
161+
- **fee-per-satoshi** (object, optional):
162+
- **value\_int** (u32): field from config or cmdline, or default
163+
- **source** (string): source of configuration setting
164+
- **max-concurrent-htlcs** (object, optional):
165+
- **value\_int** (u32): field from config or cmdline, or default
166+
- **source** (string): source of configuration setting
167+
- **htlc-minimum-msat** (object, optional):
168+
- **value\_msat** (msat): field from config or cmdline, or default
169+
- **source** (string): source of configuration setting
170+
- **htlc-maximum-msat** (object, optional):
171+
- **value\_msat** (msat): field from config or cmdline, or default
172+
- **source** (string): source of configuration setting
173+
- **max-dust-htlc-exposure-msat** (object, optional):
174+
- **value\_msat** (msat): field from config or cmdline, or default
175+
- **source** (string): source of configuration setting
176+
- **min-capacity-sat** (object, optional):
177+
- **value\_int** (u64): field from config or cmdline, or default
178+
- **source** (string): source of configuration setting
179+
- **addr** (object, optional):
180+
- **values\_str** (array of strings):
181+
- field from config or cmdline
182+
- **sources** (array of strings):
183+
- source of configuration setting
184+
- **announce-addr** (object, optional):
185+
- **values\_str** (array of strings):
186+
- field from config or cmdline
187+
- **sources** (array of strings):
188+
- source of configuration setting
189+
- **bind-addr** (object, optional):
190+
- **values\_str** (array of strings):
191+
- field from config or cmdline
192+
- **sources** (array of strings):
193+
- source of configuration setting
194+
- **offline** (object, optional):
195+
- **set** (boolean): `true` if set in config or cmdline
196+
- **source** (string): source of configuration setting
197+
- **autolisten** (object, optional):
198+
- **value\_bool** (boolean): field from config or cmdline, or default
199+
- **source** (string): source of configuration setting
200+
- **proxy** (object, optional):
201+
- **value\_str** (string): field from config or cmdline, or default
202+
- **source** (string): source of configuration setting
203+
- **disable-dns** (object, optional):
204+
- **set** (boolean): `true` if set in config or cmdline
205+
- **source** (string): source of configuration setting
206+
- **announce-addr-discovered** (object, optional) *(added v23.02)*:
207+
- **value\_str** (string): field from config or cmdline, or default (one of "true", "false", "auto")
208+
- **source** (string): source of configuration setting
209+
- **announce-addr-discovered-port** (object, optional) *(added v23.02)*:
210+
- **value\_int** (u32): field from config or cmdline, or default
211+
- **source** (string): source of configuration setting
212+
- **encrypted-hsm** (object, optional):
213+
- **set** (boolean): `true` if set in config or cmdline
214+
- **source** (string): source of configuration setting
215+
- **rpc-file-mode** (object, optional):
216+
- **value\_str** (string): field from config or cmdline, or default
217+
- **source** (string): source of configuration setting
218+
- **log-level** (object, optional):
219+
- **value\_str** (string): field from config or cmdline, or default
220+
- **source** (string): source of configuration setting
221+
- **log-prefix** (object, optional):
222+
- **value\_str** (string): field from config or cmdline, or default
223+
- **source** (string): source of configuration setting
224+
- **log-file** (object, optional):
225+
- **values\_str** (array of strings):
226+
- field from config or cmdline
227+
- **sources** (array of strings):
228+
- source of configuration setting
229+
- **log-timestamps** (object, optional):
230+
- **value\_bool** (boolean): field from config or cmdline, or default
231+
- **source** (string): source of configuration setting
232+
- **force-feerates** (object, optional):
233+
- **value\_str** (string): field from config or cmdline, or default
234+
- **source** (string): source of configuration setting
235+
- **subdaemon** (object, optional):
236+
- **values\_str** (array of strings):
237+
- field from config or cmdline
238+
- **sources** (array of strings):
239+
- source of configuration setting
240+
- **fetchinvoice-noconnect** (object, optional):
241+
- **set** (boolean): `true` if set in config or cmdline
242+
- **source** (string): source of configuration setting
243+
- **accept-htlc-tlv-types** (object, optional):
244+
- **value\_str** (string): field from config or cmdline, or default
245+
- **source** (string): source of configuration setting
246+
- **tor-service-password** (object, optional):
247+
- **value\_str** (string): field from config or cmdline, or default
248+
- **source** (string): source of configuration setting
249+
- **announce-addr-dns** (object, optional):
250+
- **value\_bool** (boolean): field from config or cmdline, or default
251+
- **source** (string): source of configuration setting
252+
- **require-confirmed-inputs** (object, optional):
253+
- **value\_bool** (boolean): field from config or cmdline, or default
254+
- **source** (string): source of configuration setting
255+
- **commit-fee** (object, optional):
256+
- **value\_int** (u64): field from config or cmdline, or default
257+
- **source** (string): source of configuration setting
38258
- **# version** (string, optional): Special field indicating the current version
39259
- **plugins** (array of objects, optional):
40260
- **path** (string): Full path of the plugin
@@ -55,7 +275,7 @@ On success, an object is returned, containing:
55275
- **bookkeeper-db** (string, optional): `bookkeeper-db` field from config or cmdline, or default
56276
- **always-use-proxy** (boolean, optional): `always-use-proxy` field from config or cmdline, or default
57277
- **daemon** (boolean, optional): `daemon` field from config or cmdline, or default
58-
- **wallet** (string, optional): `wallet` field from config or cmdline, or default
278+
- **wallet** (string, optional): `wallet` field from config or cmdline default
59279
- **large-channels** (boolean, optional): `large-channels` field from config or cmdline, or default
60280
- **experimental-dual-fund** (boolean, optional): `experimental-dual-fund` field from config or cmdline, or default
61281
- **experimental-onion-messages** (boolean, optional): `experimental-onion-messages` field from config or cmdline, or default
@@ -226,4 +446,4 @@ RESOURCES
226446

227447
Main web site: <https://github.com/ElementsProject/lightning>
228448

229-
[comment]: # ( SHA256STAMP:a0058065f618170918c09d1672d5800beeff01f0fd2d13914a4ec238398f30c3)
449+
[comment]: # ( SHA256STAMP:c847cb106f78f616b3adfe506ef499c9228f3966a44e6164b9cf49e1cf67d417)

0 commit comments

Comments
 (0)