pay: require description if bolt11 only has hash.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `pay` has `description` parameter, will be required if bolt11 only has a hash.
Changelog-Deprecated: JSON-RPC: `pay` for a bolt11 which uses a `description_hash`, without setting `description`.
This commit is contained in:
Rusty Russell
2022-04-02 13:03:05 +10:30
parent 6c54e0e7e7
commit d5c736fe86
6 changed files with 41 additions and 7 deletions

View File

@@ -398,7 +398,7 @@ 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] '\
'[maxfee]'
'[maxfee] [description]'
if DEVELOPER:
msg += ' [use_shadow]'
assert only_one(l1.rpc.help('pay')['help'])['command'] == msg