mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
wallet: Minor testing of pay_index column.
This commit is contained in:
parent
3dd50d6219
commit
ea1cea6366
@ -334,6 +334,10 @@ class LightningDTests(BaseLightningDTests):
|
||||
assert b11['expiry'] == 3600
|
||||
assert b11['payee'] == l1.info['id']
|
||||
|
||||
# Check pay_index is null
|
||||
outputs = l1.db_query('SELECT pay_index IS NULL AS q FROM invoices WHERE label="label";')
|
||||
assert len(outputs) == 1 and outputs[0]['q'] != 0
|
||||
|
||||
def test_invoice_expiry(self):
|
||||
l1,l2 = self.connect()
|
||||
|
||||
@ -719,6 +723,10 @@ class LightningDTests(BaseLightningDTests):
|
||||
l1.rpc.pay(inv)
|
||||
assert l2.rpc.listinvoice('test_pay')[0]['complete'] == True
|
||||
|
||||
# Check pay_index is not null
|
||||
outputs = l2.db_query('SELECT pay_index IS NOT NULL AS q FROM invoices WHERE label="label";')
|
||||
assert len(outputs) == 1 and outputs[0]['q'] != 0
|
||||
|
||||
def test_bad_opening(self):
|
||||
# l1 asks for a too-long locktime
|
||||
l1 = self.node_factory.get_node(options=['--locktime-blocks=100'])
|
||||
|
Loading…
Reference in New Issue
Block a user