diff --git a/common/features.h b/common/features.h index b6ad670a8..a145145ce 100644 --- a/common/features.h +++ b/common/features.h @@ -57,7 +57,7 @@ void set_feature_bit(u8 **ptr, u32 bit); #define OPT_GOSSIP_QUERIES_EX 10 #define OPT_STATIC_REMOTEKEY 12 -/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #9: +/* BOLT #9: * * | 14/15 | `payment_secret` |... IN9 ... * | 16/17 | `basic_mpp` |... IN9 ... diff --git a/common/onion.c b/common/onion.c index 09c964644..91ede1cf7 100644 --- a/common/onion.c +++ b/common/onion.c @@ -227,7 +227,7 @@ struct onion_payload *onion_decode(const tal_t *ctx, if (rs->nextcase == ONION_FORWARD) { p->total_msat = NULL; } else { - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - if it is the final node: * - MUST treat `total_msat` as if it were equal to * `amt_to_forward` if it is not present. */ @@ -276,7 +276,7 @@ struct onion_payload *onion_decode(const tal_t *ctx, p->total_msat = NULL; } else { p->forward_channel = NULL; - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - if it is the final node: * - MUST treat `total_msat` as if it were equal to * `amt_to_forward` if it is not present. */ diff --git a/lightningd/htlc_set.c b/lightningd/htlc_set.c index 1c9d86a00..b9485919f 100644 --- a/lightningd/htlc_set.c +++ b/lightningd/htlc_set.c @@ -27,9 +27,10 @@ static void destroy_htlc_set(struct htlc_set *set, htlc_set_map_del(map, set); } -/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: +/* BOLT #4: * - MUST fail all HTLCs in the HTLC set after some reasonable * timeout. + *... * - SHOULD use `mpp_timeout` for the failure message. */ static void timeout_htlc_set(struct htlc_set *set) @@ -70,7 +71,7 @@ static struct htlc_set *new_htlc_set(struct lightningd *ld, set->htlcs = tal_arr(set, struct htlc_in *, 1); set->htlcs[0] = hin; - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - MUST fail all HTLCs in the HTLC set after some reasonable * timeout. * - SHOULD wait for at least 60 seconds after the initial @@ -91,7 +92,7 @@ void htlc_set_add(struct lightningd *ld, struct htlc_set *set; const struct invoice_details *details; - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * The final node: * - MUST fail the HTLC if dictated by Requirements under * [Failure Messages](#failure-messages) @@ -104,17 +105,15 @@ void htlc_set_add(struct lightningd *ld, return; } - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - otherwise, if it supports `basic_mpp`: * - MUST add it to the HTLC set corresponding to that `payment_hash`. - * - if the total `amount_msat` of this HTLC set equals `total_msat`: - * - SHOULD fulfill all HTLCs in the HTLC set */ set = htlc_set_map_get(&ld->htlc_sets, &hin->payment_hash); if (!set) set = new_htlc_set(ld, hin, total_msat); else { - /* BOLT-0729433704dd11cc07a0535c09e5f64de7a5017b #4: + /* BOLT #4: * * if it supports `basic_mpp`: * ... @@ -135,7 +134,7 @@ void htlc_set_add(struct lightningd *ld, /* Remove from set should hin get destroyed somehow */ tal_add_destructor2(hin, htlc_set_hin_destroyed, set); - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - SHOULD fail the entire HTLC set if `total_msat` is not * the same for all HTLCs in the set. */ @@ -152,7 +151,7 @@ void htlc_set_add(struct lightningd *ld, return; } - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - if the total `amount_msat` of this HTLC set equals `total_msat`: * - SHOULD fulfill all HTLCs in the HTLC set */ @@ -176,7 +175,7 @@ void htlc_set_add(struct lightningd *ld, return; } - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - otherwise, if the total `amount_msat` of this HTLC set is less than * `total_msat`: * - MUST NOT fulfill any HTLCs in the HTLC set diff --git a/lightningd/invoice.c b/lightningd/invoice.c index 8d9a9ae21..2c03f12aa 100644 --- a/lightningd/invoice.c +++ b/lightningd/invoice.c @@ -265,7 +265,7 @@ invoice_check_payment(const tal_t *ctx, details = wallet_invoice_details(ctx, ld->wallet, invoice); - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - if the `payment_secret` doesn't match the expected value for that * `payment_hash`, or the `payment_secret` is required and is not * present: diff --git a/lightningd/pay.c b/lightningd/pay.c index b210f5f9d..12aa704eb 100644 --- a/lightningd/pay.c +++ b/lightningd/pay.c @@ -875,7 +875,7 @@ send_payment_core(struct lightningd *ld, } } - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * * - MUST NOT send another HTLC if the total `amount_msat` of the HTLC * set is already greater or equal to `total_msat`. @@ -1023,7 +1023,7 @@ send_payment(struct lightningd *ld, assert(ret); final_tlv = should_use_tlv(route[i].style); - /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: + /* BOLT #4: * - Unless `node_announcement`, `init` message or the * [BOLT #11](11-payment-encoding.md#tagged-fields) offers feature * `var_onion_optin`: