plugins/pay: Exclude the entrypoint to a routehint to avoid cycles

This uses @cdecker's idea of excluding the routehinted channel from the route,
and also consumes the route hints as it goes so that it makes progress.

I don't know if this is correct, but it reliably passes tests/test_pay.py::test_tlv_or_legacy
now.
This commit is contained in:
Rusty Russell
2020-07-23 14:20:10 +09:30
committed by Christian Decker
parent 56dd18e01e
commit 2556df5f7c
2 changed files with 25 additions and 0 deletions

View File

@@ -232,6 +232,9 @@ struct payment {
struct channel_hint *channel_hints;
struct node_id *excluded_nodes;
/* Optional temporarily excluded channel (i.e. this routehint) */
struct short_channel_id *temp_exclusion;
struct payment_result *result;
/* Did something happen that will cause all future attempts to fail?