setconfig: add transient option.

Changelog-Added: JSON-RPC: `setconfig` now has a `transient` flag which means it won't rewrite your config file.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-02-23 11:23:06 +10:30
parent 98f15aecf4
commit 5a80223f3e
12 changed files with 524 additions and 471 deletions

View File

@@ -2594,7 +2594,7 @@
},
"autoclean-expiredinvoices-age": {
"value_int": 300,
"source": "/tmp/.lightning/regtest/config:2",
"source": "/tmp/.lightning/regtest/config.setconfig:2",
"plugin": "/root/lightning/plugins/autoclean",
"dynamic": true
},
@@ -2903,7 +2903,7 @@
},
"min-capacity-sat": {
"value_int": 500000,
"source": "/tmp/.lightning/regtest/config:4",
"source": "/tmp/.lightning/regtest/config.setconfig:3",
"dynamic": true
},
"min-emergency-msat": {

View File

@@ -38,6 +38,14 @@
"description": [
"Value of the config variable to be set or updated."
]
},
"transient": {
"type": "boolean",
"added": "v25.02",
"default": "False",
"description": [
"If set, this change does NOT try to alter the configuration files, so the change will be reverted on any restart."
]
}
}
},
@@ -149,7 +157,7 @@
"config": {
"config": "autoclean-expiredinvoices-age",
"value_int": 300,
"source": "/tmp/.lightning/regtest/config:2",
"source": "/tmp/.lightning/regtest/config.setconfig:2",
"plugin": "/root/lightning/plugins/autoclean",
"dynamic": true
}
@@ -168,7 +176,7 @@
"config": {
"config": "min-capacity-sat",
"value_int": 500000,
"source": "/tmp/.lightning/regtest/config:4",
"source": "/tmp/.lightning/regtest/config.setconfig:3",
"dynamic": true
}
}