forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lightning-disconnect.7.txt
61 lines (47 loc) · 1.42 KB
/
lightning-disconnect.7.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
LIGHTNING-DISCONNECT(7)
=======================
:doctype: manpage
NAME
----
lightning-disconnect - Command for disconnecting from another lightning node.
SYNOPSIS
--------
*disconnect* 'id' ['force']
DESCRIPTION
-----------
The disconnect RPC command closes an existing connection to a
peer, identified by 'id', in the Lightning Network, as long as it
doesn't have an active channel. If 'force' is set then it will disconnect
even with an active channel.
The 'id' can be discovered in the output of the listpeers
command, which returns a set of peers:
{
"peers": [
{
"id": "0563aea81...",
"connected": true,
...
}
]
}
Passing the 'id' attribute of a peer to 'disconnect' will terminate
the connection.
RETURN VALUE
------------
On success, an empty object is returned.
ERRORS
------
If 'id' is invalid, an error message will be returned:
{ "code" : -1, "message" : "Peer not connected" }
If the peer has an active channel and 'force' is not set, an error message
will be returned:
{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
AUTHOR
------
Michael Hawkins <[email protected]>.
SEE ALSO
--------
lightning-connect(1), lightning-listpeers(1)
RESOURCES
---------
Main web site: https://github.com/ElementsProject/lightning