pytest: test pay ordering.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-05-31 12:07:30 +09:30 committed by neil saitug
parent 23fada090c
commit a794e87edd
1 changed files with 14 additions and 0 deletions

View File

@ -3498,6 +3498,20 @@ def test_listpays_ongoing_attempt(node_factory, bitcoind, executor):
l1.rpc.listpays()
def test_listsendpays_and_listpays_order(node_factory):
"""listsendpays should be in increasing id order, listpays in created_at"""
l1, l2 = node_factory.line_graph(2)
for i in range(5):
inv = l2.rpc.invoice(1000 - i, "test {}".format(i), "test")['bolt11']
l1.rpc.pay(inv)
ids = [p['id'] for p in l1.rpc.listsendpays()['payments']]
assert ids == sorted(ids)
created_at = [p['created_at'] for p in l1.rpc.listpays()['pays']]
assert created_at == sorted(created_at)
@pytest.mark.developer("needs use_shadow")
def test_mpp_waitblockheight_routehint_conflict(node_factory, bitcoind, executor):
'''