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

@@ -1835,10 +1835,7 @@ def test_dataloss_protection(node_factory, bitcoind):
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
# l1 should send out WIRE_INIT (0010)
l1.daemon.wait_for_log(r"\[OUT\] 0010"
# gflen
+ format(len(lf) // 2, '04x')
+ lf
l1.daemon.wait_for_log(r"\[OUT\] 0010.*"
# lflen
+ format(len(lf) // 2, '04x')
+ lf)