mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
lightningd: actually deprecate old notification fields now tests and plugins are all updated.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: JSON-RPC: `connect`, `disconnect` and `block_added` notification fields outside the same-named object (use .connect/.disconnect/.block_added sub-objects)
This commit is contained in:
parent
99b885c84c
commit
1606ef1487
@ -57,8 +57,8 @@ static void connect_notification_serialize(struct json_stream *stream,
|
||||
const struct wireaddr_internal *addr)
|
||||
{
|
||||
/* Old style: Add raw fields without connect key */
|
||||
/* FIXME: Deprecate! */
|
||||
json_add_connect_fields(stream, nodeid, incoming, addr);
|
||||
if (deprecated_apis)
|
||||
json_add_connect_fields(stream, nodeid, incoming, addr);
|
||||
json_object_start(stream, "connect");
|
||||
json_add_connect_fields(stream, nodeid, incoming, addr);
|
||||
json_object_end(stream);
|
||||
@ -94,8 +94,8 @@ static void disconnect_notification_serialize(struct json_stream *stream,
|
||||
struct node_id *nodeid)
|
||||
{
|
||||
/* Old style: Add raw fields without disconnect key */
|
||||
/* FIXME: deprecate! */
|
||||
json_add_disconnect_fields(stream, nodeid);
|
||||
if (deprecated_apis)
|
||||
json_add_disconnect_fields(stream, nodeid);
|
||||
json_object_start(stream, "disconnect");
|
||||
json_add_disconnect_fields(stream, nodeid);
|
||||
json_object_end(stream);
|
||||
@ -609,10 +609,11 @@ static void json_add_block_added_fields(struct json_stream *stream,
|
||||
static void block_added_notification_serialize(struct json_stream *stream,
|
||||
struct block *block)
|
||||
{
|
||||
/* FIXME: deprecate! */
|
||||
json_object_start(stream, "block");
|
||||
json_add_block_added_fields(stream, block);
|
||||
json_object_end(stream);
|
||||
if (deprecated_apis) {
|
||||
json_object_start(stream, "block");
|
||||
json_add_block_added_fields(stream, block);
|
||||
json_object_end(stream);
|
||||
}
|
||||
json_object_start(stream, "block_added");
|
||||
json_add_block_added_fields(stream, block);
|
||||
json_object_end(stream);
|
||||
|
Loading…
Reference in New Issue
Block a user