-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
common/features: only support a single feature bitset. #3145
common/features: only support a single feature bitset. #3145
Conversation
be5886d
to
52207ac
Compare
@@ -36,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
Note: You should always set `allow-deprecated-apis=false` to test for | |||
changes. | |||
|
|||
- JSON API: `listpeers` and `listnodes` fields `localfeatures` and `globalfeatures` (now just `features`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also change the plugin hooks/notifications API then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(peer_connected
for example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peer_connected
was updated in 52207ac, the documentation is lagging however.
connectd/connectd.h
Outdated
@@ -19,7 +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 *globalfeatures TAKES, | |||
const u8 *localfeatures TAKES); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localfeatures -> features ?
@@ -36,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
Note: You should always set `allow-deprecated-apis=false` to test for | |||
changes. | |||
|
|||
- JSON API: `listpeers` and `listnodes` fields `localfeatures` and `globalfeatures` (now just `features`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peer_connected
was updated in 52207ac, the documentation is lagging however.
went ahead and fixed up my two nits; updated commit is here niftynei@ae6a3db |
This is mainly an internal-only change, especially since we don't offer any globalfeatures. However, LND (as of next release) will offer global features, and also expect option_static_remotekey to be a *global* feature. So we send our (merged) feature bitset as both global and local in init, and fold those bitsets together when we get an init msg. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
52207ac
to
40bfdb3
Compare
OK, that was weird. Rebased on master, pushed a fixup for review (squash on merge please!) |
This is mainly an internal-only change, especially since we don't
offer any globalfeatures.
However, LND (as of next release) will offer global features, and also
expect option_static_remotekey to be a global feature. So we send
our (merged) feature bitset as both global and local in init, and fold
those bitsets together when we get an init msg.
This works with every proposal:
lightning/bolts#680
lightning/bolts#666