mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
pay/sendpay: also store description in case bolt11 uses description_hash.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -716,6 +716,16 @@ def test_invoice_deschash(node_factory, chainparams):
|
||||
|
||||
l1.rpc.pay(inv['bolt11'], description=listinv['description'])
|
||||
|
||||
# Description will be in some.
|
||||
found = False
|
||||
for p in l1.rpc.listsendpays()['payments']:
|
||||
if 'description' in p:
|
||||
found = True
|
||||
assert p['description'] == listinv['description']
|
||||
assert found
|
||||
|
||||
assert only_one(l1.rpc.listpays(inv['bolt11'])['pays'])['description'] == listinv['description']
|
||||
|
||||
# Try removing description.
|
||||
l2.rpc.delinvoice('label', "paid", desconly=True)
|
||||
assert 'description' not in only_one(l2.rpc.listinvoices()['invoices'])
|
||||
|
||||
Reference in New Issue
Block a user