Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -3706,10 +3706,12 @@
"SetConfig.config.plugin": 3,
"SetConfig.config.set": 5,
"SetConfig.config.source": 2,
"SetConfig.config.sources[]": 10,
"SetConfig.config.value_bool": 9,
"SetConfig.config.value_int": 8,
"SetConfig.config.value_msat": 7,
"SetConfig.config.value_str": 6
"SetConfig.config.value_str": 6,
"SetConfig.config.values_str[]": 11
},
"SetconfigRequest": {
"SetConfig.config": 1,
Expand Down Expand Up @@ -13028,6 +13030,10 @@
"added": "pre-v0.10.1",
"deprecated": null
},
"SetConfig.config.sources[]": {
"added": "v25.12",
"deprecated": null
},
"SetConfig.config.value_bool": {
"added": "pre-v0.10.1",
"deprecated": null
Expand All @@ -13044,6 +13050,10 @@
"added": "pre-v0.10.1",
"deprecated": null
},
"SetConfig.config.values_str[]": {
"added": "v25.12",
"deprecated": null
},
"SetConfig.transient": {
"added": "v25.02",
"deprecated": null
Expand Down
4 changes: 3 additions & 1 deletion cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions common/configvar.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,18 @@ void configvar_finalize_overrides(struct configvar **cvs)
opts = tal_arr(tmpctx, const struct opt_table *, tal_count(cvs));
for (size_t i = 0; i < tal_count(cvs); i++) {
opts[i] = opt_find_long(cvs[i]->optvar, NULL);
/* If you're allowed multiple, they don't override */
if (opts[i]->type & OPT_MULTI)
/* If you're allowed multiple, they don't override...
* unless transient values exist, which override non-transient. */
if (opts[i]->type & OPT_MULTI) {
if (cvs[i]->src != CONFIGVAR_SETCONFIG_TRANSIENT)
continue;
for (size_t j = 0; j < i; j++) {
if (opts[j] == opts[i] &&
cvs[j]->src != CONFIGVAR_SETCONFIG_TRANSIENT)
cvs[j]->overridden = true;
}
continue;
}
for (size_t j = 0; j < i; j++) {
if (opts[j] == opts[i])
cvs[j]->overridden = true;
Expand Down
65 changes: 62 additions & 3 deletions contrib/msggen/msggen/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32674,10 +32674,19 @@
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": [
"For multi options, an array of string values."
]
}
],
"description": [
"Value of the config variable to be set or updated."
"Value of the config variable to be set or updated. For multi options, this must be an array of strings."
]
},
"transient": {
Expand All @@ -32704,7 +32713,6 @@
"additionalProperties": false,
"required": [
"config",
"source",
"dynamic"
],
"properties": {
Expand All @@ -32717,7 +32725,17 @@
"source": {
"type": "string",
"description": [
"Source of configuration setting (`file`:`linenum`)."
"Source of configuration setting (`file`:`linenum`) for non-multi options."
]
},
"sources": {
"type": "array",
"added": "v25.12",
"items": {
"type": "string"
},
"description": [
"Sources of configuration settings (`file`:`linenum`) for multi options."
]
},
"plugin": {
Expand Down Expand Up @@ -32764,6 +32782,16 @@
"description": [
"For boolean options."
]
},
"values_str": {
"type": "array",
"added": "v25.12",
"items": {
"type": "string"
},
"description": [
"For multi-string options."
]
}
}
}
Expand Down Expand Up @@ -32821,6 +32849,37 @@
"dynamic": true
}
}
},
{
"description": [
"This shows setting a multi-value dynamic plugin option (requires a plugin that defines such an option)."
],
"request": {
"id": "example:setconfig#3",
"method": "setconfig",
"params": {
"config": "my-multi-option",
"val": [
"value1",
"value2"
]
}
},
"response": {
"config": {
"config": "my-multi-option",
"values_str": [
"value1",
"value2"
],
"sources": [
"/tmp/.lightning/regtest/config.setconfig:4",
"/tmp/.lightning/regtest/config.setconfig:5"
],
"plugin": "/root/lightning/plugins/myplugin",
"dynamic": true
}
}
}
]
},
Expand Down
1,040 changes: 520 additions & 520 deletions contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions contrib/pyln-testing/pyln/testing/grpc2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,8 @@ def setchannel2py(m):

def setconfig_config2py(m):
return remove_default({
"sources": [m.sources for i in m.sources], # ArrayField[primitive] in generate_composite
"values_str": [m.values_str for i in m.values_str], # ArrayField[primitive] in generate_composite
"config": m.config, # PrimitiveField in generate_composite
"dynamic": m.dynamic, # PrimitiveField in generate_composite
"plugin": m.plugin, # PrimitiveField in generate_composite
Expand Down
65 changes: 62 additions & 3 deletions doc/schemas/setconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,19 @@
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": [
"For multi options, an array of string values."
]
}
],
"description": [
"Value of the config variable to be set or updated."
"Value of the config variable to be set or updated. For multi options, this must be an array of strings."
]
},
"transient": {
Expand All @@ -63,7 +72,6 @@
"additionalProperties": false,
"required": [
"config",
"source",
"dynamic"
],
"properties": {
Expand All @@ -76,7 +84,17 @@
"source": {
"type": "string",
"description": [
"Source of configuration setting (`file`:`linenum`)."
"Source of configuration setting (`file`:`linenum`) for non-multi options."
]
},
"sources": {
"type": "array",
"added": "v25.12",
"items": {
"type": "string"
},
"description": [
"Sources of configuration settings (`file`:`linenum`) for multi options."
]
},
"plugin": {
Expand Down Expand Up @@ -123,6 +141,16 @@
"description": [
"For boolean options."
]
},
"values_str": {
"type": "array",
"added": "v25.12",
"items": {
"type": "string"
},
"description": [
"For multi-string options."
]
}
}
}
Expand Down Expand Up @@ -180,6 +208,37 @@
"dynamic": true
}
}
},
{
"description": [
"This shows setting a multi-value dynamic plugin option (requires a plugin that defines such an option)."
],
"request": {
"id": "example:setconfig#3",
"method": "setconfig",
"params": {
"config": "my-multi-option",
"val": [
"value1",
"value2"
]
}
},
"response": {
"config": {
"config": "my-multi-option",
"values_str": [
"value1",
"value2"
],
"sources": [
"/tmp/.lightning/regtest/config.setconfig:4",
"/tmp/.lightning/regtest/config.setconfig:5"
],
"plugin": "/root/lightning/plugins/myplugin",
"dynamic": true
}
}
}
]
}
Loading
Loading