paymod: Allow callers to opt out of shadow routing amount fuzzing

With MPP we require that the sum of parts is equal to the `total_msat` amount
declared in the onion. Since that can't be changed once the first part arrives
we need a way to disable amount fuzzing for MPP.
This commit is contained in:
Christian Decker
2020-07-06 19:21:33 +02:00
parent 406d0d09cf
commit 7f53ade64b
2 changed files with 17 additions and 5 deletions

View File

@@ -307,6 +307,11 @@ struct shadow_route_data {
struct payment_constraints constraints;
struct node_id destination;
struct route_hop *route;
/* multi-part payments require the sum of parts to be the exact
* amount, so we allow the payment flow to opt out of fuzzing the
* amount. */
bool fuzz_amount;
};
struct direct_pay_data {