From 54009895521cca7194041d5430c19fdd34cc0a9c Mon Sep 17 00:00:00 2001 From: Lagrang3 Date: Mon, 19 Aug 2024 08:26:22 +0100 Subject: [PATCH] renepay: bugfix: apply channel filter globally Channel filter must apply to the modified gossmap+localmods, otherwise we disable local channels with htlcmax=0. Signed-off-by: Lagrang3 --- plugins/renepay/mods.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/renepay/mods.c b/plugins/renepay/mods.c index 6a584a3167fb..ee724b5342f8 100644 --- a/plugins/renepay/mods.c +++ b/plugins/renepay/mods.c @@ -1127,6 +1127,7 @@ static struct command_result *channelfilter_cb(struct payment *payment) * HTLC_MAX_FRACTION. */ htlc_max_threshold = MIN(htlc_max_threshold, HTLC_MAX_STOP_MSAT); + gossmap_apply_localmods(pay_plugin->gossmap, payment->local_gossmods); for (const struct gossmap_node *node = gossmap_first_node(pay_plugin->gossmap); node; node = gossmap_next_node(pay_plugin->gossmap, node)) { @@ -1147,6 +1148,7 @@ static struct command_result *channelfilter_cb(struct payment *payment) } } } + gossmap_remove_localmods(pay_plugin->gossmap, payment->local_gossmods); // FIXME: prune the network over other parameters, eg. capacity, // fees, ... plugin_log(pay_plugin->plugin, LOG_DBG,