close: activate notifications even with deprecated-apis.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `close` now always returns notifications on delays.
This commit is contained in:
Rusty Russell
2021-04-06 13:34:25 +09:30
parent 3c5ea7fd8e
commit 162ba9d162
3 changed files with 8 additions and 11 deletions

View File

@@ -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)",