mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
plugins: remove 'blank' option parsing for bool
bools must be set!
This commit is contained in:
parent
42cce55b45
commit
563b46814b
@ -497,7 +497,7 @@ char *plugin_opt_set(const char *arg, struct plugin_opt *popt)
|
||||
if (streq(arg, "true") || streq(arg, "True") || streq(arg, "1")) {
|
||||
*popt->value->as_bool = true;
|
||||
} else if (streq(arg, "false") || streq(arg, "False")
|
||||
|| streq(arg, "0") || streq(arg, "")) {
|
||||
|| streq(arg, "0")) {
|
||||
*popt->value->as_bool = false;
|
||||
} else
|
||||
return tal_fmt(tmpctx, "%s does not parse as type %s",
|
||||
|
@ -69,7 +69,7 @@ def test_option_types(node_factory):
|
||||
n = node_factory.get_node(options={
|
||||
'plugin': plugin_path, 'str_opt': 'ok',
|
||||
'int_opt': 22,
|
||||
'bool_opt': '',
|
||||
'bool_opt': 'true',
|
||||
'flag_opt': None,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user