From acef45d02e6e937a13b3b6d27ddaa15e509290ff Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 10 Sep 2021 11:44:24 +0930 Subject: [PATCH] common/channel_type: fix up bolt quotes now channel-types is merged. Signed-off-by: Rusty Russell --- common/channel_type.c | 10 +++++----- openingd/openingd.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/channel_type.c b/common/channel_type.c index 842a1631967f..9a7abf0c2198 100644 --- a/common/channel_type.c +++ b/common/channel_type.c @@ -1,7 +1,7 @@ #include #include -/* BOLT-channel-types #2: +/* BOLT #2: * Channel types are an explicit enumeration: for convenience of future * definitions they reuse even feature bits, but they are not an * arbitrary combination (they represent the persistent features which @@ -46,13 +46,13 @@ struct channel_type *default_channel_type(const tal_t *ctx, const struct feature_set *our_features, const u8 *their_features) { - /* BOLT-channel-types #2: + /* BOLT #2: * Both peers: * - if `channel_type` was present in both `open_channel` and `accept_channel`: * - This is the `channel_type` (they must be equal, required above) * - otherwise: */ - /* BOLT-channel-types #2: + /* BOLT #2: * - otherwise, if `option_anchor_outputs` was negotiated: * - the `channel_type` is `option_anchor_outputs` and * `option_static_remotekey` (bits 20 and 12) @@ -60,14 +60,14 @@ struct channel_type *default_channel_type(const tal_t *ctx, if (feature_negotiated(our_features, their_features, OPT_ANCHOR_OUTPUTS)) return channel_type_anchor_outputs(ctx); - /* BOLT-channel-types #2: + /* BOLT #2: * - otherwise, if `option_static_remotekey` was negotiated: * - the `channel_type` is `option_static_remotekey` (bit 12) */ else if (feature_negotiated(our_features, their_features, OPT_STATIC_REMOTEKEY)) return channel_type_static_remotekey(ctx); - /* BOLT-channel-types #2: + /* BOLT #2: * - otherwise: * - the `channel_type` is empty */ diff --git a/openingd/openingd.c b/openingd/openingd.c index 3309cc25ed1f..2052b9e2e24e 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -380,7 +380,7 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags) open_tlvs->upfront_shutdown_script = state->upfront_shutdown_script[LOCAL]; - /* BOLT-channel-types #2: + /* BOLT #2: * - if it includes `channel_type`: * - MUST set it to a defined type representing the type it wants. * - MUST use the smallest bitmap possible to represent the channel @@ -451,7 +451,7 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags) } set_remote_upfront_shutdown(state, accept_tlvs->upfront_shutdown_script); - /* BOLT-channel-types #2: + /* BOLT #2: * - if `channel_type` is set, and `channel_type` was set in * `open_channel`, and they are not equal types: * - MUST reject the channel. @@ -834,7 +834,7 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg) "Parsing open_channel %s", tal_hex(tmpctx, open_channel_msg)); set_remote_upfront_shutdown(state, open_tlvs->upfront_shutdown_script); - /* BOLT-channel-types #2: + /* BOLT #2: * The receiving node MUST fail the channel if: *... * - It supports `channel_type`, `channel_type` was set, and the @@ -1022,7 +1022,7 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg) accept_tlvs = tlv_accept_channel_tlvs_new(tmpctx); accept_tlvs->upfront_shutdown_script = state->upfront_shutdown_script[LOCAL]; - /* BOLT-channel-types #2: + /* BOLT #2: * - if it sets `channel_type`: * - MUST set it to the `channel_type` from `open_channel` */