pytest: test pay ordering.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
23fada090c
commit
a794e87edd
|
@ -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):
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue