pay: Exempt a fee from the maxfeepercent rule it is still tiny

Several users have noticed that they cannot pay satoshis.place or similar places
that have tiny payment amounts if they are not directly connected. This is due
to the forwarding fee dominating the transferred amount.

This commit adds a new option, exempting tiny fees (up to 5 satoshis by default)
from having to pass the maxfeepercent flag. While we could have told users to
tweak maxfeepercent I think it is usefull to have a default exemption.

[Squashed --RR]
This commit is contained in:
Christian Decker
2018-07-30 03:05:43 +02:00
committed by Rusty Russell
parent a235c1fa67
commit 55d450ff00
4 changed files with 20 additions and 7 deletions

View File

@@ -65,9 +65,9 @@ bool invoices_create(struct invoices *invoices,
/**
* invoices_find_by_label - Search for an invoice by label
*
* @invoices - the invoice handler.
* @pinvoice - pointer to location to load found invoice in.
* @label - the label to search for.
* @param invoices - the invoice handler.
* @param pinvoice - pointer to location to load found invoice in.
* @param label - the label to search for.
*
* Returns false if no invoice with that label exists.
* Returns true if found.