common/features: only support a single feature bitset.#3145
Merged
rustyrussell merged 2 commits intoOct 11, 2019
Conversation
be5886d to
52207ac
Compare
| 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`). |
Contributor
There was a problem hiding this comment.
Should we also change the plugin hooks/notifications API then ?
Contributor
There was a problem hiding this comment.
(peer_connected for example)
Collaborator
There was a problem hiding this comment.
peer_connected was updated in 52207ac, the documentation is lagging however.
niftynei
reviewed
Oct 10, 2019
| const struct wireaddr_internal *addr, | ||
| const struct crypto_state *cs, | ||
| const u8 *globalfeatures TAKES, | ||
| const u8 *localfeatures TAKES); |
Collaborator
There was a problem hiding this comment.
localfeatures -> features ?
| 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`). |
Collaborator
There was a problem hiding this comment.
peer_connected was updated in 52207ac, the documentation is lagging however.
Collaborator
|
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
Contributor
Author
|
OK, that was weird. Rebased on master, pushed a fixup for review (squash on merge please!) |
niftynei
approved these changes
Oct 10, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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