Browse Source

Makefile: update bolt markers which have been since merged.

We tag them with specific versions when they're experimental,
but do a poor job of cleaning them up (and thus ensuring they're
checked!) afterwards.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
committed by ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent
commit
3cf8443285
  1. 2
      common/features.h
  2. 4
      common/onion.c
  3. 19
      lightningd/htlc_set.c
  4. 2
      lightningd/invoice.c
  5. 4
      lightningd/pay.c

2
common/features.h

@ -57,7 +57,7 @@ void set_feature_bit(u8 **ptr, u32 bit);
#define OPT_GOSSIP_QUERIES_EX 10 #define OPT_GOSSIP_QUERIES_EX 10
#define OPT_STATIC_REMOTEKEY 12 #define OPT_STATIC_REMOTEKEY 12
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #9: /* BOLT #9:
* *
* | 14/15 | `payment_secret` |... IN9 ... * | 14/15 | `payment_secret` |... IN9 ...
* | 16/17 | `basic_mpp` |... IN9 ... * | 16/17 | `basic_mpp` |... IN9 ...

4
common/onion.c

@ -227,7 +227,7 @@ struct onion_payload *onion_decode(const tal_t *ctx,
if (rs->nextcase == ONION_FORWARD) { if (rs->nextcase == ONION_FORWARD) {
p->total_msat = NULL; p->total_msat = NULL;
} else { } else {
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - if it is the final node: * - if it is the final node:
* - MUST treat `total_msat` as if it were equal to * - MUST treat `total_msat` as if it were equal to
* `amt_to_forward` if it is not present. */ * `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; p->total_msat = NULL;
} else { } else {
p->forward_channel = NULL; p->forward_channel = NULL;
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - if it is the final node: * - if it is the final node:
* - MUST treat `total_msat` as if it were equal to * - MUST treat `total_msat` as if it were equal to
* `amt_to_forward` if it is not present. */ * `amt_to_forward` if it is not present. */

19
lightningd/htlc_set.c

@ -27,9 +27,10 @@ static void destroy_htlc_set(struct htlc_set *set,
htlc_set_map_del(map, set); htlc_set_map_del(map, set);
} }
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - MUST fail all HTLCs in the HTLC set after some reasonable * - MUST fail all HTLCs in the HTLC set after some reasonable
* timeout. * timeout.
*...
* - SHOULD use `mpp_timeout` for the failure message. * - SHOULD use `mpp_timeout` for the failure message.
*/ */
static void timeout_htlc_set(struct htlc_set *set) 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 = tal_arr(set, struct htlc_in *, 1);
set->htlcs[0] = hin; set->htlcs[0] = hin;
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - MUST fail all HTLCs in the HTLC set after some reasonable * - MUST fail all HTLCs in the HTLC set after some reasonable
* timeout. * timeout.
* - SHOULD wait for at least 60 seconds after the initial * - 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; struct htlc_set *set;
const struct invoice_details *details; const struct invoice_details *details;
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* The final node: * The final node:
* - MUST fail the HTLC if dictated by Requirements under * - MUST fail the HTLC if dictated by Requirements under
* [Failure Messages](#failure-messages) * [Failure Messages](#failure-messages)
@ -104,17 +105,15 @@ void htlc_set_add(struct lightningd *ld,
return; return;
} }
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - otherwise, if it supports `basic_mpp`: * - otherwise, if it supports `basic_mpp`:
* - MUST add it to the HTLC set corresponding to that `payment_hash`. * - 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); set = htlc_set_map_get(&ld->htlc_sets, &hin->payment_hash);
if (!set) if (!set)
set = new_htlc_set(ld, hin, total_msat); set = new_htlc_set(ld, hin, total_msat);
else { else {
/* BOLT-0729433704dd11cc07a0535c09e5f64de7a5017b #4: /* BOLT #4:
* *
* if it supports `basic_mpp`: * if it supports `basic_mpp`:
* ... * ...
@ -135,7 +134,7 @@ void htlc_set_add(struct lightningd *ld,
/* Remove from set should hin get destroyed somehow */ /* Remove from set should hin get destroyed somehow */
tal_add_destructor2(hin, htlc_set_hin_destroyed, set); 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 * - SHOULD fail the entire HTLC set if `total_msat` is not
* the same for all HTLCs in the set. * the same for all HTLCs in the set.
*/ */
@ -152,7 +151,7 @@ void htlc_set_add(struct lightningd *ld,
return; return;
} }
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - if the total `amount_msat` of this HTLC set equals `total_msat`: * - if the total `amount_msat` of this HTLC set equals `total_msat`:
* - SHOULD fulfill all HTLCs in the HTLC set * - SHOULD fulfill all HTLCs in the HTLC set
*/ */
@ -176,7 +175,7 @@ void htlc_set_add(struct lightningd *ld,
return; return;
} }
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - otherwise, if the total `amount_msat` of this HTLC set is less than * - otherwise, if the total `amount_msat` of this HTLC set is less than
* `total_msat`: * `total_msat`:
* - MUST NOT fulfill any HTLCs in the HTLC set * - MUST NOT fulfill any HTLCs in the HTLC set

2
lightningd/invoice.c

@ -265,7 +265,7 @@ invoice_check_payment(const tal_t *ctx,
details = wallet_invoice_details(ctx, ld->wallet, invoice); 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 * - if the `payment_secret` doesn't match the expected value for that
* `payment_hash`, or the `payment_secret` is required and is not * `payment_hash`, or the `payment_secret` is required and is not
* present: * present:

4
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 * - MUST NOT send another HTLC if the total `amount_msat` of the HTLC
* set is already greater or equal to `total_msat`. * set is already greater or equal to `total_msat`.
@ -1023,7 +1023,7 @@ send_payment(struct lightningd *ld,
assert(ret); assert(ret);
final_tlv = should_use_tlv(route[i].style); final_tlv = should_use_tlv(route[i].style);
/* BOLT-9441a66faad63edc8cd89860b22fbf24a86f0dcd #4: /* BOLT #4:
* - Unless `node_announcement`, `init` message or the * - Unless `node_announcement`, `init` message or the
* [BOLT #11](11-payment-encoding.md#tagged-fields) offers feature * [BOLT #11](11-payment-encoding.md#tagged-fields) offers feature
* `var_onion_optin`: * `var_onion_optin`:

Loading…
Cancel
Save