common/features: clean up feature handling for different cases.

The spec is (RSN!) going to explicitly denote where each feature should
be presented, so create that infrastructure.

Incorporate the new proposed bolt11 features, which need this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-23 10:49:23 +10:30
parent 9765642bf8
commit 3b37c9d426
5 changed files with 122 additions and 33 deletions

View File

@@ -87,7 +87,7 @@ int main(void)
assert(features_unsupported(bits) == -1);
/* We must support our own features. */
lf = get_offered_features(tmpctx);
lf = get_offered_initfeatures(tmpctx);
assert(features_unsupported(lf) == -1);
/* We can add random odd features, no problem. */