mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
common: allow configvars to be marked dynamic.
To test, we do min-capacity-sat which is simple. We also update the listconfigs man page which contained some obsolete information. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -9,12 +9,27 @@ SYNOPSIS
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
*config* (optional) is a configuration option name, or "plugin" to show plugin options
|
||||
*config* (optional) is a configuration option name to restrict return.
|
||||
|
||||
The **listconfigs** RPC command to list all configuration options, or with *config* only a selection.
|
||||
The **listconfigs** RPC command to list all configuration options, or with *config* only one.
|
||||
|
||||
The returned values reflect the current configuration, including
|
||||
showing default values (`dev-` options are not shown).
|
||||
showing default values (`dev-` options are not shown unless specified as *config* explicitly).
|
||||
|
||||
Note: as plugins can add options, not all configuration settings are
|
||||
listed here! The format of each entry is as follows:
|
||||
|
||||
- **source** (string): source of configuration setting (`file`:`linenum`)
|
||||
- **dynamic** (boolean, optional): true if this option is settable via setconfig
|
||||
- **plugin** (string, optional): set if this is from a plugin
|
||||
|
||||
Depending on the option type, exactly one of the following is present:
|
||||
|
||||
- **set** (boolean, optional): for simple flag options
|
||||
- **value\_str** (string, optional): for string options
|
||||
- **value\_msat** (msat, optional): for msat options
|
||||
- **value\_int** (integer, optional): for integer options
|
||||
- **value\_bool** (boolean, optional): for boolean options
|
||||
|
||||
EXAMPLE JSON REQUEST
|
||||
--------------------
|
||||
@@ -177,6 +192,7 @@ On success, an object is returned, containing:
|
||||
- **min-capacity-sat** (object, optional):
|
||||
- **value\_int** (u64): field from config or cmdline, or default
|
||||
- **source** (string): source of configuration setting
|
||||
- **dynamic** (boolean, optional): Can this be set by setconfig() (always *true*)
|
||||
- **addr** (object, optional):
|
||||
- **values\_str** (array of strings):
|
||||
- field from config or cmdline
|
||||
@@ -447,4 +463,4 @@ RESOURCES
|
||||
|
||||
Main web site: <https://github.com/ElementsProject/lightning>
|
||||
|
||||
[comment]: # ( SHA256STAMP:2b3588b395919162c122cd386f0f4b320d906d0190e706bfa1b68db4126e7ee2)
|
||||
[comment]: # ( SHA256STAMP:0440e4634e4a28681323f891307c7bb61143aacad4824f952f24f027a7543835)
|
||||
|
||||
@@ -834,6 +834,13 @@
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "source of configuration setting"
|
||||
},
|
||||
"dynamic": {
|
||||
"type": "boolean",
|
||||
"enum": [
|
||||
true
|
||||
],
|
||||
"description": "Can this be set by setconfig()"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user