mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: remove deprecated_apis global, put into lightningd.
We usually have access to `ld`, so avoid the global. The only place generic code needs it is for the json command struct, and that already has accessors: add one for libplugin and lightningd to tell it if deprecated apis are OK. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1983,7 +1983,7 @@ static void json_add_peer(struct lightningd *ld,
|
||||
/* Note: If !PEER_CONNECTED, peer may use different features on reconnect */
|
||||
json_add_hex_talarr(response, "features", p->their_features);
|
||||
|
||||
if (deprecated_apis) {
|
||||
if (ld->deprecated_apis) {
|
||||
json_array_start(response, "channels");
|
||||
json_add_uncommitted_channel(response, p->uncommitted_channel, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user