(node_factory)
| 410 | |
| 411 | @pytest.mark.flaky(reruns=2) |
| 412 | def test_self_pay(node_factory): |
| 413 | l1, l2 = node_factory.line_graph(2, wait_for_announce=True, opts={'allow-deprecated-apis': True}) |
| 414 | |
| 415 | inv = l1.rpc.invoice(10000, "test", "test")["bolt11"] |
| 416 | l1.rpc.call("renepay", {"invstring": inv}) |
| 417 | |
| 418 | # We can pay twice, no problem! |
| 419 | l1.rpc.call("renepay", {"invstring": inv}) |
| 420 | |
| 421 | inv2 = l1.rpc.invoice(10000, "test2", "test2")["bolt11"] |
| 422 | l1.rpc.delinvoice("test2", "unpaid") |
| 423 | |
| 424 | with pytest.raises(RpcError, match=r"Unknown invoice") as excinfo: |
| 425 | l1.rpc.call("renepay", {"invstring": inv2}) |
| 426 | assert excinfo.value.error["code"] == 203 |
| 427 | |
| 428 | |
| 429 | def test_fee_allocation(node_factory): |
nothing calls this directly
no test coverage detected