One failure, one success; we only want to delete the failed one!
(node_factory, bitcoind)
| 4120 | |
| 4121 | |
| 4122 | def test_delpay_mixed_status(node_factory, bitcoind): |
| 4123 | """ |
| 4124 | One failure, one success; we only want to delete the failed one! |
| 4125 | """ |
| 4126 | l1, l2, l3 = node_factory.line_graph(3, fundamount=10**5, |
| 4127 | wait_for_announce=True) |
| 4128 | # Expensive route! |
| 4129 | l4 = node_factory.get_node(options={'fee-per-satoshi': 1000, |
| 4130 | 'fee-base': 2000}) |
| 4131 | node_factory.join_nodes([l1, l4, l3], wait_for_announce=True) |
| 4132 | |
| 4133 | # Don't give a hint, so l1 chooses cheapest. |
| 4134 | inv = l3.dev_invoice(10**5, 'lbl', 'desc', dev_routes=[]) |
| 4135 | l3.rpc.disconnect(l2.info['id'], force=True) |
| 4136 | l1.rpc.pay(inv['bolt11']) |
| 4137 | |
| 4138 | assert len(l1.rpc.listsendpays()['payments']) == 2 |
| 4139 | delpay_result = l1.rpc.delpay(inv['payment_hash'], 'failed')['payments'] |
| 4140 | assert len(delpay_result) == 1 |
| 4141 | assert len(l1.rpc.listsendpays()['payments']) == 1 |
| 4142 | |
| 4143 | |
| 4144 | @pytest.mark.parametrize("keysendcmd", ["keysend", "xkeysend"]) |
nothing calls this directly
no test coverage detected