MCPcopy Create free account
hub / github.com/ElementsProject/lightning / payment_lower_max_htlcs

Function payment_lower_max_htlcs

plugins/libplugin-pay.c:3640–3652  ·  view source on GitHub ↗

payment_lower_max_htlcs * * @brief indicates that we have a good reason to believe that * we should limit our number of max HTLCs. * * @desc Causes future payment_max_htlcs to have a maximum value * they return. * Can be called by multiple paymods: the lowest one any paymod * has given will be used. * If this is called with a limit higher than the existing limit, * it just successfully r

Source from the content-addressed store, hash-verified

3638 * reasonable.
3639 */
3640static void payment_lower_max_htlcs(struct payment *p, u32 limit,
3641 const char *why)
3642{
3643 struct payment *root = payment_root(p);
3644 if (root->max_htlcs > limit) {
3645 paymod_log(p, LOG_INFORM,
3646 "%s limit on max HTLCs: %"PRIu32", %s",
3647 root->max_htlcs == UINT32_MAX ?
3648 "Initial" : "Lowering",
3649 limit, why);
3650 root->max_htlcs = limit;
3651 }
3652}
3653
3654static bool payment_supports_mpp(struct payment *p)
3655{

Callers 1

Calls 2

payment_rootFunction · 0.85
paymod_logFunction · 0.85

Tested by

no test coverage detected