From 162ba9d16280fa6845fa445be4a3f7682ee2cf61 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 6 Apr 2021 13:34:25 +0930 Subject: [PATCH] close: activate notifications even with deprecated-apis. Signed-off-by: Rusty Russell Changelog-Changed: JSON-RPC: `close` now always returns notifications on delays. --- doc/lightning-close.7 | 7 +++---- doc/lightning-close.7.md | 5 ++--- lightningd/peer_control.c | 7 +++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/doc/lightning-close.7 b/doc/lightning-close.7 index 0bee4ae3c..e6478dd06 100644 --- a/doc/lightning-close.7 +++ b/doc/lightning-close.7 @@ -78,9 +78,8 @@ closed if the peer reconnected\. .SH NOTIFICATIONS -If \fBallow-deprecated-apis\fR is false, notifications may be returned -indicating what is going on, especially if the peer is offline and we -are waiting\. This will be enabled by default in future! +Notifications may be returned indicating what is going on, especially +if the peer is offline and we are waiting\. .SH RETURN VALUE @@ -111,4 +110,4 @@ ZmnSCPxj \fI is mainly responsible\. Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:f835c6a11e0df5610761e858e78783f9f99d530b8d2a6bedaf6f301eccdc31e0 +\" SHA256STAMP:c8a4fe414eeb72880346601be2e73f1ad6decb31b4d4e291549d8b339e47b68d diff --git a/doc/lightning-close.7.md b/doc/lightning-close.7.md index d33654498..676272a48 100644 --- a/doc/lightning-close.7.md +++ b/doc/lightning-close.7.md @@ -68,9 +68,8 @@ closed if the peer reconnected. NOTIFICATIONS ------------- -If `allow-deprecated-apis` is false, notifications may be returned -indicating what is going on, especially if the peer is offline and we -are waiting. This will be enabled by default in future! +Notifications may be returned indicating what is going on, especially +if the peer is offline and we are waiting. RETURN VALUE ------------ diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 337754a59..ad8786b87 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -287,9 +287,8 @@ close_command_timeout(struct close_command *cc) /* This will trigger drop_to_chain, which will trigger * resolution of the command and destruction of the * close_command. */ - if (!deprecated_apis) - json_notify_fmt(cc->cmd, LOG_INFORM, - "Timed out, forcing close."); + json_notify_fmt(cc->cmd, LOG_INFORM, + "Timed out, forcing close."); channel_fail_permanent(cc->channel, REASON_USER, "Forcibly closed by `close` command timeout"); } @@ -313,7 +312,7 @@ register_close_command(struct lightningd *ld, &destroy_close_command_on_channel_destroy, cc); - if (!deprecated_apis && !channel->owner) { + if (!channel->owner) { char *msg = tal_strdup(tmpctx, "peer is offline, will negotiate once they reconnect"); if (timeout) tal_append_fmt(&msg, " (%u seconds before unilateral close)",