Skip to content

Commit

Permalink
renepay: bugfix: apply channel filter globally
Browse files Browse the repository at this point in the history
Channel filter must apply to the modified gossmap+localmods,
otherwise we disable local channels with htlcmax=0.

Signed-off-by: Lagrang3 <[email protected]>
  • Loading branch information
Lagrang3 authored and ShahanaFarooqui committed Aug 19, 2024
1 parent 4fdc74f commit 5400989
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/renepay/mods.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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,
Expand Down

0 comments on commit 5400989

Please sign in to comment.