mpp: Add the presplit-modifier that splits a root payment first

This commit is contained in:
Christian Decker
2020-07-01 18:59:42 +02:00
parent 7f53ade64b
commit c97ff05ffb
3 changed files with 110 additions and 0 deletions

View File

@@ -181,6 +181,13 @@ void htlc_set_add(struct lightningd *ld,
return;
}
log_debug(ld->log,
"HTLC set contains %zu HTLCs, for a total of %s out of %s",
tal_count(set->htlcs),
type_to_string(tmpctx, struct amount_msat, &set->so_far),
type_to_string(tmpctx, struct amount_msat, &total_msat)
);
if (amount_msat_eq(set->so_far, total_msat)) {
/* Disable timer now, in case invoice_hook is slow! */
tal_free(set->timeout);