From 0e4a30c635d00b55e928504a835b3f8095a633a4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 12 Dec 2019 10:24:45 +1030 Subject: [PATCH] doc: update experimental bolt version quotes. Signed-off-by: Rusty Russell --- common/bolt11.c | 4 ++-- common/features.h | 2 +- common/onion.c | 4 ++-- lightningd/invoice.c | 7 +------ lightningd/pay.c | 4 ++-- lightningd/peer_htlcs.c | 2 +- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/common/bolt11.c b/common/bolt11.c index d431659dc..e892a9611 100644 --- a/common/bolt11.c +++ b/common/bolt11.c @@ -302,7 +302,7 @@ static char *decode_n(struct bolt11 *b11, return NULL; } -/* BOLT-412c260b537be95b105ae2062463f1d992024ca7 #11: +/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #11: * * * `s` (16): `data_length` 52. This 256-bit secret prevents * forwarding nodes from probing the payment recipient. @@ -317,7 +317,7 @@ static char *decode_s(struct bolt11 *b11, return unknown_field(b11, hu5, data, data_len, 's', data_length); - /* BOLT-412c260b537be95b105ae2062463f1d992024ca7 #11: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #11: * * A reader... MUST skip over unknown fields, OR an `f` field * with unknown `version`, OR `p`, `h`, `s` or `n` fields that do diff --git a/common/features.h b/common/features.h index cb8150350..987f7e1b4 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-3a09bc54f8443c4757b47541a5310aff6377ee21 #9: +/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #9: * * | 14/15 | `payment_secret` |... IN9 ... * | 16/17 | `basic_mpp` |... IN9 ... diff --git a/common/onion.c b/common/onion.c index 1c1fe02c3..82865953f 100644 --- a/common/onion.c +++ b/common/onion.c @@ -231,7 +231,7 @@ struct onion_payload *onion_decode(const tal_t *ctx, if (rs->nextcase == ONION_FORWARD) { p->total_msat = NULL; } else { - /* BOLT-e36f7b6517e1173dcbd49da3b516cfe1f48ae556 #4: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #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. */ @@ -279,7 +279,7 @@ struct onion_payload *onion_decode(const tal_t *ctx, p->total_msat = NULL; } else { p->forward_channel = NULL; - /* BOLT-e36f7b6517e1173dcbd49da3b516cfe1f48ae556 #4: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #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/invoice.c b/lightningd/invoice.c index 4965aed11..ac6fc4e5e 100644 --- a/lightningd/invoice.c +++ b/lightningd/invoice.c @@ -252,7 +252,7 @@ void invoice_try_pay(struct lightningd *ld, log_debug(ld->log, "payment_secret is %s", payment_secret ? "set": "NULL"); - /* BOLT-e36f7b6517e1173dcbd49da3b516cfe1f48ae556 #4: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: * * - if the `payment_secret` doesn't match the expected value for that * `payment_hash`, or the `payment_secret` is required and is not @@ -260,11 +260,6 @@ void invoice_try_pay(struct lightningd *ld, * - MUST fail the HTLC. * - MUST return an `incorrect_or_unknown_payment_details` error. */ - /* BOLT-e36f7b6517e1173dcbd49da3b516cfe1f48ae556 #1: - * - * - if `payment_secret` is required in the onion: - * - MUST set the even feature `var_onion_optin`. - */ if (feature_is_set(details->features, COMPULSORY_FEATURE(OPT_VAR_ONION)) && !payment_secret) { fail_htlc(hin, WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS); diff --git a/lightningd/pay.c b/lightningd/pay.c index 7e33b3d84..7d20aecf8 100644 --- a/lightningd/pay.c +++ b/lightningd/pay.c @@ -833,7 +833,7 @@ send_payment_core(struct lightningd *ld, } } - /* BOLT-3a09bc54f8443c4757b47541a5310aff6377ee21 #4: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: * * - MUST NOT send another HTLC if the total `amount_msat` of the HTLC * set is already greater or equal to `total_msat`. @@ -979,7 +979,7 @@ send_payment(struct lightningd *ld, assert(ret); final_tlv = should_use_tlv(route[i].style); - /* BOLT-3a09bc54f8443c4757b47541a5310aff6377ee21 #4: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: * - Unless `node_announcement`, `init` message or the * [BOLT #11](11-payment-encoding.md#tagged-fields) offers feature * `var_onion_optin`: diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 77370da4a..dd3807b6f 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -301,7 +301,7 @@ static void handle_localpay(struct htlc_in *hin, goto fail; } - /* BOLT- #4: + /* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: * - if it does not support `basic_mpp`: * - MUST fail the HTLC if `total_msat` is not exactly equal to * `amt_to_forward`.