mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: trigger changed wait when delinvoice desconly used.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -799,7 +799,7 @@ def test_wait_invoices(node_factory, executor):
|
||||
# Creating a new on gives us 3, not another 2!
|
||||
waitfut = executor.submit(l2.rpc.call, 'wait', {'subsystem': 'invoices', 'indexname': 'created', 'nextvalue': 3})
|
||||
time.sleep(1)
|
||||
inv = l2.rpc.invoice(42, 'invlabel2', 'invdesc2')
|
||||
inv = l2.rpc.invoice(42, 'invlabel2', 'invdesc2', deschashonly=True)
|
||||
waitres = waitfut.result(TIMEOUT)
|
||||
assert waitres == {'subsystem': 'invoices',
|
||||
'created': 3,
|
||||
@@ -807,6 +807,15 @@ def test_wait_invoices(node_factory, executor):
|
||||
'bolt11': inv['bolt11'],
|
||||
'status': 'unpaid'}}
|
||||
|
||||
# Deleting a description causes updated to fire!
|
||||
waitfut = executor.submit(l2.rpc.call, 'wait', {'subsystem': 'invoices', 'indexname': 'updated', 'nextvalue': 3})
|
||||
time.sleep(1)
|
||||
l2.rpc.delinvoice('invlabel2', status='unpaid', desconly=True)
|
||||
waitres = waitfut.result(TIMEOUT)
|
||||
assert waitres == {'subsystem': 'invoices',
|
||||
'updated': 3,
|
||||
'details': {'label': 'invlabel2', 'description': 'invdesc2'}}
|
||||
|
||||
|
||||
def test_invoice_deschash(node_factory, chainparams):
|
||||
l1, l2 = node_factory.line_graph(2)
|
||||
|
||||
Reference in New Issue
Block a user