mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
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:
parent
3c5ea7fd8e
commit
162ba9d162
7
doc/lightning-close.7
generated
7
doc/lightning-close.7
generated
@ -78,9 +78,8 @@ closed if the peer reconnected\.
|
|||||||
|
|
||||||
.SH NOTIFICATIONS
|
.SH NOTIFICATIONS
|
||||||
|
|
||||||
If \fBallow-deprecated-apis\fR is false, notifications may be returned
|
Notifications may be returned indicating what is going on, especially
|
||||||
indicating what is going on, especially if the peer is offline and we
|
if the peer is offline and we are waiting\.
|
||||||
are waiting\. This will be enabled by default in future!
|
|
||||||
|
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
|
||||||
@ -111,4 +110,4 @@ ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
|
|||||||
|
|
||||||
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
||||||
|
|
||||||
\" SHA256STAMP:f835c6a11e0df5610761e858e78783f9f99d530b8d2a6bedaf6f301eccdc31e0
|
\" SHA256STAMP:c8a4fe414eeb72880346601be2e73f1ad6decb31b4d4e291549d8b339e47b68d
|
||||||
|
@ -68,9 +68,8 @@ closed if the peer reconnected.
|
|||||||
|
|
||||||
NOTIFICATIONS
|
NOTIFICATIONS
|
||||||
-------------
|
-------------
|
||||||
If `allow-deprecated-apis` is false, notifications may be returned
|
Notifications may be returned indicating what is going on, especially
|
||||||
indicating what is going on, especially if the peer is offline and we
|
if the peer is offline and we are waiting.
|
||||||
are waiting. This will be enabled by default in future!
|
|
||||||
|
|
||||||
RETURN VALUE
|
RETURN VALUE
|
||||||
------------
|
------------
|
||||||
|
@ -287,7 +287,6 @@ close_command_timeout(struct close_command *cc)
|
|||||||
/* This will trigger drop_to_chain, which will trigger
|
/* This will trigger drop_to_chain, which will trigger
|
||||||
* resolution of the command and destruction of the
|
* resolution of the command and destruction of the
|
||||||
* close_command. */
|
* close_command. */
|
||||||
if (!deprecated_apis)
|
|
||||||
json_notify_fmt(cc->cmd, LOG_INFORM,
|
json_notify_fmt(cc->cmd, LOG_INFORM,
|
||||||
"Timed out, forcing close.");
|
"Timed out, forcing close.");
|
||||||
channel_fail_permanent(cc->channel, REASON_USER,
|
channel_fail_permanent(cc->channel, REASON_USER,
|
||||||
@ -313,7 +312,7 @@ register_close_command(struct lightningd *ld,
|
|||||||
&destroy_close_command_on_channel_destroy,
|
&destroy_close_command_on_channel_destroy,
|
||||||
cc);
|
cc);
|
||||||
|
|
||||||
if (!deprecated_apis && !channel->owner) {
|
if (!channel->owner) {
|
||||||
char *msg = tal_strdup(tmpctx, "peer is offline, will negotiate once they reconnect");
|
char *msg = tal_strdup(tmpctx, "peer is offline, will negotiate once they reconnect");
|
||||||
if (timeout)
|
if (timeout)
|
||||||
tal_append_fmt(&msg, " (%u seconds before unilateral close)",
|
tal_append_fmt(&msg, " (%u seconds before unilateral close)",
|
||||||
|
Loading…
Reference in New Issue
Block a user