Skip to content

Commit 1f92a8c

Browse files
committed
assert payment success in get_swap
1 parent 5a1865d commit 1f92a8c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

itest/tests/test_swap_claim_success.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ def test_swap_claim_success(node_factory, swapd_factory):
2626
wait_for(lambda: swapper.lightning_node.bitcoin.rpc.getmempoolinfo()["size"] == 1)
2727
swapper.lightning_node.bitcoin.generate_block(1)
2828
wait_for(lambda: len(swapper.lightning_node.list_utxos()) == expected_outputs)
29+
30+
swap = swapper.internal_rpc.get_swap(address)
31+
assert swap.address == address
32+
assert swap.creation_time > 0
33+
assert swap.payment_hash == h
34+
assert len(swap.outputs) == 1
35+
assert len(swap.active_locks) == 0
36+
assert len(swap.payment_attempts) == 1
37+
assert swap.payment_attempts[0].success == True

0 commit comments

Comments
 (0)