diff --git a/CHANGELOG.md b/CHANGELOG.md index 93c66b022e32..223d426ccc6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ changes. - JSON-API: `fundchannel_start` now uses `amount` as the parameter name to replace `satoshi` - JSON API: `listpeers` and `listnodes` fields `localfeatures` and `globalfeatures` (now just `features`). +- Plugin: `peer_connected` hook fields `localfeatures` and `globalfeatures` (now just `features`). ### Removed diff --git a/connectd/connectd.h b/connectd/connectd.h index 46a4d4797a13..8e16e3ab72cd 100644 --- a/connectd/connectd.h +++ b/connectd/connectd.h @@ -19,6 +19,6 @@ struct io_plan *peer_connected(struct io_conn *conn, const struct node_id *id, const struct wireaddr_internal *addr, const struct crypto_state *cs, - const u8 *localfeatures TAKES); + const u8 *features TAKES); #endif /* LIGHTNING_CONNECTD_CONNECTD_H */ diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index e76a51cd07e5..7e3c92454608 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -485,8 +485,7 @@ the cryptographic handshake. The parameters have the following structure if ther "peer": { "id": "03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f", "addr": "34.239.230.56:9735", - "globalfeatures": "", - "localfeatures": "" + "features": "" } } ``` diff --git a/doc/lightning-listpeers.7 b/doc/lightning-listpeers.7 index 553c122ba3f3..1e8732b67935 100644 --- a/doc/lightning-listpeers.7 +++ b/doc/lightning-listpeers.7 @@ -47,6 +47,7 @@ of 0 or more objects\. Each object in the list contains the following data: +.RS .IP \[bu] \fIid\fR : The unique id of the peer .IP \[bu] @@ -54,15 +55,14 @@ Each object in the list contains the following data: .IP \[bu] \fInetaddr\fR : A list of network addresses the node is listening on .IP \[bu] -\fIglobalfeatures\fR : Bit flags showing supported global features (BOLT #9) -.IP \[bu] -\fIlocalfeatures\fR : Bit flags showing supported local features (BOLT #9) +\fIfeatures\fR : Bit flags showing supported features (BOLT #9) .IP \[bu] \fIchannels\fR : An list of channel id’s open on the peer .IP \[bu] \fIlog\fR : Only present if \fIlevel\fR is set\. List logs related to the peer at the specified \fIlevel\fR +.RE If \fIid\fR is supplied and no matching nodes are found, a "peers" object with an empty list is returned\.