pay: add absolute "maxfee" parameter.

This is what LND does, and it's better for upper layers than trying to
twist our maxfeepercent / exemptfee heuristics to suit.

(I don't remember who complained about this, sorry!)

I'm doing this now because I want to add YA parameter next!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `pay` has new parameter `maxfee` for setting absolute fee (instead of using `maxfeepercent` and/or `exemptfee`)
This commit is contained in:
Rusty Russell
2022-04-02 12:55:04 +10:30
parent 713cd0540d
commit 6c54e0e7e7
6 changed files with 55 additions and 19 deletions

View File

@@ -397,7 +397,8 @@ def test_pay_plugin(node_factory):
# Make sure usage messages are present.
msg = 'pay bolt11 [msatoshi] [label] [riskfactor] [maxfeepercent] '\
'[retry_for] [maxdelay] [exemptfee] [localofferid] [exclude]'
'[retry_for] [maxdelay] [exemptfee] [localofferid] [exclude] '\
'[maxfee]'
if DEVELOPER:
msg += ' [use_shadow]'
assert only_one(l1.rpc.help('pay')['help'])['command'] == msg