mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
listconfigs: show plugin options in 'configs' with normal options.
This integrates them with configvars properly: they almost "just work" in listconfigs now, and we don't put them in a special sub-object under their plugin. Unfortunately, this means `listconfigs` now has a loose schema: any plugin can add something to it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: Plugins: reloaded plugins get passed any vars from configuration files. Changelog-Deprecated: Config: boolean plugin options set to `1` or `0` (use `true` and `false` like non-plugin options).
This commit is contained in:
@@ -1617,7 +1617,7 @@ static const char *init(struct plugin *p, const char *buf UNUSED,
|
||||
|
||||
rpc_scan(p, "listconfigs",
|
||||
take(json_out_obj(NULL, "config", "experimental-offers")),
|
||||
"{experimental-offers:%}",
|
||||
"{configs:{experimental-offers:{set:%}}}",
|
||||
JSON_SCAN(json_to_bool, &exp_offers));
|
||||
|
||||
if (!exp_offers)
|
||||
|
||||
@@ -1050,7 +1050,9 @@ static const char *init(struct plugin *p,
|
||||
|
||||
rpc_scan(p, "listconfigs",
|
||||
take(json_out_obj(NULL, NULL, NULL)),
|
||||
"{cltv-final:%,experimental-offers:%}",
|
||||
"{configs:"
|
||||
"{cltv-final:{value_int:%},"
|
||||
"experimental-offers:{set:%}}}",
|
||||
JSON_SCAN(json_to_u16, &cltv_final),
|
||||
JSON_SCAN(json_to_bool, &offers_enabled));
|
||||
|
||||
|
||||
@@ -582,7 +582,9 @@ static const char *init(struct plugin *p,
|
||||
|
||||
rpc_scan(p, "listconfigs",
|
||||
take(json_out_obj(NULL, NULL, NULL)),
|
||||
"{max-locktime-blocks:%,experimental-offers:%}",
|
||||
"{configs:"
|
||||
"{max-locktime-blocks:{value_int:%},"
|
||||
"experimental-offers:{set:%}}}",
|
||||
JSON_SCAN(json_to_number, &maxdelay_default),
|
||||
JSON_SCAN(json_to_bool, &exp_offers));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user