(node_factory)
| 860 | @pytest.mark.openchannel('v1') |
| 861 | @pytest.mark.openchannel('v2') |
| 862 | def test_reconnect_receiver_add(node_factory): |
| 863 | disconnects = ['-WIRE_COMMITMENT_SIGNED', |
| 864 | '+WIRE_COMMITMENT_SIGNED', |
| 865 | '-WIRE_REVOKE_AND_ACK', |
| 866 | '+WIRE_REVOKE_AND_ACK'] |
| 867 | |
| 868 | if EXPERIMENTAL_DUAL_FUND: |
| 869 | disconnects = ['=WIRE_COMMITMENT_SIGNED'] + disconnects |
| 870 | |
| 871 | # Feerates identical so we don't get gratuitous commit to update them |
| 872 | l1 = node_factory.get_node(may_reconnect=True, feerates=(7500, 7500, 7500, 7500)) |
| 873 | l2 = node_factory.get_node(disconnect=disconnects, |
| 874 | may_reconnect=True) |
| 875 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 876 | |
| 877 | l1.fundchannel(l2, 10**6) |
| 878 | |
| 879 | amt = 200000000 |
| 880 | inv = l2.rpc.invoice(amt, 'testpayment2', 'desc') |
| 881 | rhash = inv['payment_hash'] |
| 882 | assert only_one(l2.rpc.listinvoices('testpayment2')['invoices'])['status'] == 'unpaid' |
| 883 | |
| 884 | route = [{'amount_msat': amt, 'id': l2.info['id'], 'delay': 5, 'channel': first_scid(l1, l2)}] |
| 885 | l1.rpc.sendpay(route, rhash, payment_secret=inv['payment_secret']) |
| 886 | for i in range(len(disconnects)): |
| 887 | l1.daemon.wait_for_log('Already have funding locked in') |
| 888 | assert only_one(l2.rpc.listinvoices('testpayment2')['invoices'])['status'] == 'paid' |
| 889 | |
| 890 | |
| 891 | def test_reconnect_receiver_fulfill(node_factory): |
nothing calls this directly
no test coverage detected