pay: Exempt a fee from the maxfeepercent rule it is still tiny#1765
Conversation
| p_opt_def("retry_for", json_tok_number, &retryfor, 60), | ||
| p_opt_def("maxdelay", json_tok_number, &maxdelay, | ||
| cmd->ld->config.locktime_max), | ||
| p_opt_def("exemptfee", json_tok_number, &exemptfee, 5000), |
There was a problem hiding this comment.
does that also make the argument available as an option in the config file?
There was a problem hiding this comment.
No. This only deals with json parameters. config and command line parameters are handled in lightningd/options.c.
|
thanks for pinging me! that really helped (especially after I already started looking at |
| * cast u64 to double for feepercent calculation. */ | ||
| feepercent = ((double) fee) * 100.0 / ((double) pay->msatoshi); | ||
| fee_too_high = (feepercent > pay->maxfeepercent); | ||
| fee_too_high = (fee <= pay->exemptfee && feepercent > pay->maxfeepercent); |
There was a problem hiding this comment.
I think it should be fee_too_high = (fee > pay->exemptfee && feepercent > pay->maxfeepercent);
fee_too_high should only be true if the fee is more than the pay->exemptfee
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.
|
Also add the description to the |
|
Ack dddf5ca |
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.
Not sure about the name of the option just yet, the current naming is based on
exempting it from the check, which feels clunky. Maybe someone else has a
good idea?
Fixes #1746
Ping @SerafinTech, @renepickhardt, @jonathancross