mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-17 13:06:36 +02:00
wallet: Minor testing of pay_index column.
This commit is contained in:
parent
3dd50d6219
commit
ea1cea6366
1 changed files with 8 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue