Makefile: update bolts fc40879995ebc61cc50dfd729512f17afb15b355.

"Allow nodes to overshoot the MPP `total_msat` when paying (#1031)"

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Protocol: Allow slight overpaying, even with MPP, as spec now recommends.
This commit is contained in:
Rusty Russell 2023-04-07 16:06:17 +09:30
parent 15f8e1e63c
commit fdf9b13bdb
2 changed files with 7 additions and 6 deletions

View File

@ -23,7 +23,7 @@ CCANDIR := ccan
# Where we keep the BOLT RFCs
BOLTDIR := ../bolts/
DEFAULT_BOLTVERSION := 60cfb5972ad4bec4c49ee0f9e729fb3352fcdc6a
DEFAULT_BOLTVERSION := fc40879995ebc61cc50dfd729512f17afb15b355
# Can be overridden on cmdline.
BOLTVERSION := $(DEFAULT_BOLTVERSION)

View File

@ -175,10 +175,6 @@ void htlc_set_add(struct lightningd *ld,
return;
}
/* BOLT #4:
* - if the total `amount_msat` of this HTLC set equals `total_msat`:
* - SHOULD fulfill all HTLCs in the HTLC set
*/
if (!amount_msat_add(&set->so_far, set->so_far, hin->msat)) {
log_unusual(ld->log, "Failing HTLC set %s:"
" overflow adding %s+%s",
@ -202,7 +198,12 @@ void htlc_set_add(struct lightningd *ld,
payment_secret ? "" : "no "
);
if (amount_msat_eq(set->so_far, total_msat)) {
/* BOLT #4:
* - if the total `amount_msat` of this HTLC set is equal to or greater than
* `total_msat`:
* - SHOULD fulfill all HTLCs in the HTLC set
*/
if (amount_msat_greater_eq(set->so_far, total_msat)) {
/* Disable timer now, in case invoice_hook is slow! */
tal_free(set->timeout);
invoice_try_pay(ld, set, details);