mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
plugin: add in deprecated_api behavior and test
we also check that the node isn't running now, for extra pedancity
This commit is contained in:
committed by
Rusty Russell
parent
b25a8ba29d
commit
41b18050a0
@@ -1128,11 +1128,13 @@ plugin_populate_init_request(struct plugin *plugin, struct jsonrpc_request *req)
|
||||
name = opt->name + 2;
|
||||
if (opt->value->as_bool) {
|
||||
json_add_bool(req->stream, name, *opt->value->as_bool);
|
||||
continue;
|
||||
if (!deprecated_apis)
|
||||
continue;
|
||||
}
|
||||
if (opt->value->as_int) {
|
||||
json_add_s64(req->stream, name, *opt->value->as_int);
|
||||
continue;
|
||||
if (!deprecated_apis)
|
||||
continue;
|
||||
}
|
||||
if (opt->value->as_str) {
|
||||
json_add_string(req->stream, name, opt->value->as_str);
|
||||
|
||||
Reference in New Issue
Block a user