connect: return address we actually connected to.

Otherwise, we might find an address other than the one given and
the user might think that address worked.

Fixes: #4185
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `connect` returns `address` it actually connected to
This commit is contained in:
Rusty Russell
2021-03-16 14:14:36 +10:30
parent 3fd22f86df
commit 6c9d9ee9a2
13 changed files with 42 additions and 21 deletions

View File

@@ -22,7 +22,7 @@ be of the form \fIid@host\fR or \fIid@host:port\fR\. In this case, the \fIhost\f
If not specified, the \fIport\fR defaults to 9735\.
If \fIhost\fR is not specified, the connection will be attempted to an IP
If \fIhost\fR is not specified (or doesn't work), the connection will be attempted to an IP
belonging to \fIid\fR obtained through gossip with other already connected
peers\.
This can fail if your C-lightning node is a fresh install that has not
@@ -43,7 +43,7 @@ another node\. Once the peer is connected a channel can be opened with
.SH RETURN VALUE
On success the peer \fIid\fR is returned, as well as a hexidecimal \fIfeatures\fR
bitmap\.
bitmap and an \fIaddress\fR object as per \fBlightning-listnodes\fR(7)\.
.SH ERRORS
@@ -94,4 +94,4 @@ Felix \fI<fixone@gmail.com\fR> is the original author of this manpage\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:5f99f87ec4d94984b36da81b3f3b6fd21100b58baea493f5d0c3f50ffdcbf301
\" SHA256STAMP:336c35e791dc6439115e25a2f58ffb9dc68989c96d51b6c39cb3de6d40328ae5

View File

@@ -20,7 +20,7 @@ be of the form *id@host* or *id@host:port*. In this case, the *host* and
If not specified, the *port* defaults to 9735.
If *host* is not specified, the connection will be attempted to an IP
If *host* is not specified (or doesn't work), the connection will be attempted to an IP
belonging to *id* obtained through gossip with other already connected
peers.
This can fail if your C-lightning node is a fresh install that has not
@@ -40,7 +40,7 @@ RETURN VALUE
------------
On success the peer *id* is returned, as well as a hexidecimal *features*
bitmap.
bitmap and an *address* object as per lightning-listnodes(7).
ERRORS
------