From 264b3692fbbf134a6a25268928bdb8ed8133ca6f Mon Sep 17 00:00:00 2001 From: trueptolemy Date: Thu, 29 Aug 2019 15:54:19 +0800 Subject: [PATCH] doc: update the document of `fundchannel_cancel` --- doc/lightning-fundchannel_cancel.7 | 13 ++++++++++--- doc/lightning-fundchannel_cancel.7.md | 14 +++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/doc/lightning-fundchannel_cancel.7 b/doc/lightning-fundchannel_cancel.7 index 348453301..2d5eba416 100644 --- a/doc/lightning-fundchannel_cancel.7 +++ b/doc/lightning-fundchannel_cancel.7 @@ -7,11 +7,18 @@ lightning-fundchannel_cancel - Command for completing channel establishment .SH DESCRIPTION -\fBfundchannel_cancel\fR is a lower level RPC command\. It allows a user to -cancel an initiated channel establishment with a connected peer\. +\fBfundchannel_cancel\fR is a lower level RPC command\. It allows channel funder +to cancel a channel before funding broadcast with a connected peer\. +\fIid\fR is the node id of the remote peer with which to cancel\. -\fIid\fR is the node id of the remote peer with which to cancel the +Note that the funding transaction MUST NOT be broadcast before +\fBfundchannel_cancel\fR\. Broadcasting transaction before \fBfundchannel_cancel\fR +WILL lead to unrecoverable loss of funds\. + +If \fBfundchannel_cancel\fR is called after \fBfundchannel_complete\fR, the remote +peer may disconnect when command succeeds\. In this case, user need to connect +to remote peer again before opening channel\. .SH RETURN VALUE diff --git a/doc/lightning-fundchannel_cancel.7.md b/doc/lightning-fundchannel_cancel.7.md index c32fa966f..12540aff3 100644 --- a/doc/lightning-fundchannel_cancel.7.md +++ b/doc/lightning-fundchannel_cancel.7.md @@ -9,10 +9,18 @@ SYNOPSIS DESCRIPTION ----------- -`fundchannel_cancel` is a lower level RPC command. It allows a user to -cancel an initiated channel establishment with a connected peer. +`fundchannel_cancel` is a lower level RPC command. It allows channel funder +to cancel a channel before funding broadcast with a connected peer. -*id* is the node id of the remote peer with which to cancel the +*id* is the node id of the remote peer with which to cancel. + +Note that the funding transaction MUST NOT be broadcast before +`fundchannel_cancel`. Broadcasting transaction before `fundchannel_cancel` +WILL lead to unrecoverable loss of funds. + +If `fundchannel_cancel` is called after `fundchannel_complete`, the remote +peer may disconnect when command succeeds. In this case, user need to connect +to remote peer again before opening channel. RETURN VALUE ------------