Add route exclusion payment modifier and pay rpc exclude arg

Changelog-Added: Add `exclude` option for `pay` command to manually exclude channels or nodes when finding a route.
This commit is contained in:
Andrew Toth
2021-11-18 14:24:24 -05:00
committed by Rusty Russell
parent 384c359c79
commit fa6f01d5b1
3 changed files with 58 additions and 0 deletions

View File

@@ -406,6 +406,10 @@ struct adaptive_split_mod_data {
u32 htlc_budget;
};
struct route_exclusions_data {
struct route_exclusion **exclusions;
};
/* List of globally available payment modifiers. */
REGISTER_PAYMENT_MODIFIER_HEADER(retry, struct retry_mod_data);
REGISTER_PAYMENT_MODIFIER_HEADER(routehints, struct routehints_data);
@@ -426,6 +430,8 @@ REGISTER_PAYMENT_MODIFIER_HEADER(local_channel_hints, void);
* we detect the payee to have, in order to not exhaust the number of HTLCs
* each of those channels can bear. */
REGISTER_PAYMENT_MODIFIER_HEADER(payee_incoming_limit, void);
REGISTER_PAYMENT_MODIFIER_HEADER(route_exclusions, struct route_exclusions_data);
struct payment *payment_new(tal_t *ctx, struct command *cmd,
struct payment *parent,