features: renumber from 102/103 to 38/39.

100+ is for experimentation, modern spec practice is to assign feature bits
sequentially as PRs get added, to avoid later renumbering.

Still respect the old bit for now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-07-02 09:41:30 +09:30
parent 38fafc7d6d
commit 6336d39a95
5 changed files with 10 additions and 9 deletions

View file

@ -397,7 +397,7 @@ static const char *feature_name(const tal_t *ctx, size_t f)
NULL,
NULL,
NULL,
NULL,
"option_onion_messages", /* 38/39 */
NULL, /* 40/41 */
NULL,
NULL,
@ -429,7 +429,6 @@ static const char *feature_name(const tal_t *ctx, size_t f)
NULL,
NULL,
NULL, /* 100/101 */
"option_onion_messages", /* 102/103 */
};
if (f / 2 >= ARRAY_SIZE(fnames) || !fnames[f / 2])

View file

@ -127,11 +127,11 @@ const char *fmt_featurebits(const tal_t *ctx, const u8 *featurebits);
*/
#define OPT_DUAL_FUND 28
/* BOLT-9fc25cfd2895578c0b1ab701ebe6c1eb67a19623 #9:
/* BOLT-1ede04a1a3225581e265b3ce96984ba88253a4a4 #9:
*
* | 102/103 | `option_onion_messages` |... INC+ ...
* | 38/39 | `option_onion_messages` |... INC+ ...
*/
#define OPT_ONION_MESSAGES 102
#define OPT_ONION_MESSAGES 38
#define OPT_SHUTDOWN_WRONG_FUNDING 104

View file

@ -516,7 +516,9 @@ static bool can_carry_onionmsg(const struct gossmap *map,
/* Check features of recipient */
n = gossmap_nth_node(map, c, !dir);
return n && gossmap_node_get_feature(map, n, OPT_ONION_MESSAGES) != -1;
/* 102/103 was the old EXPERIMENTAL feature bit: remove soon! */
return gossmap_node_get_feature(map, n, OPT_ONION_MESSAGES) != -1
|| gossmap_node_get_feature(map, n, 102) != -1;
}
/* Create path to node which can carry onion messages; if it can't find

View file

@ -4168,7 +4168,7 @@ def test_fetchinvoice_autoconnect(node_factory, bitcoind):
if EXPERIMENTAL_FEATURES:
# We have to force option_onion_messages off!
opts1 = {'dev-force-features': '-103'}
opts1 = {'dev-force-features': '-39'}
else:
opts1 = {}
l1, l2 = node_factory.line_graph(2, wait_for_announce=True,

View file

@ -23,7 +23,7 @@ def expected_peer_features(wumbo_channels=False, extra=[]):
features = [1, 5, 7, 9, 11, 13, 15, 17, 27]
if EXPERIMENTAL_FEATURES:
# OPT_ONION_MESSAGES
features += [103]
features += [39]
# option_anchor_outputs
features += [21]
if wumbo_channels:
@ -43,7 +43,7 @@ def expected_node_features(wumbo_channels=False, extra=[]):
features = [1, 5, 7, 9, 11, 13, 15, 17, 27, 55]
if EXPERIMENTAL_FEATURES:
# OPT_ONION_MESSAGES
features += [103]
features += [39]
# option_anchor_outputs
features += [21]
if wumbo_channels: