(node_factory)
| 827 | @pytest.mark.openchannel('v1') |
| 828 | @pytest.mark.openchannel('v2') |
| 829 | def test_reconnect_sender_add(node_factory): |
| 830 | disconnects = ['-WIRE_COMMITMENT_SIGNED', |
| 831 | '+WIRE_COMMITMENT_SIGNED', |
| 832 | '-WIRE_REVOKE_AND_ACK', |
| 833 | '+WIRE_REVOKE_AND_ACK'] |
| 834 | if EXPERIMENTAL_DUAL_FUND: |
| 835 | disconnects = ['=WIRE_COMMITMENT_SIGNED'] + disconnects |
| 836 | |
| 837 | # Feerates identical so we don't get gratuitous commit to update them |
| 838 | l1 = node_factory.get_node(disconnect=disconnects, |
| 839 | may_reconnect=True, |
| 840 | feerates=(7500, 7500, 7500, 7500)) |
| 841 | l2 = node_factory.get_node(may_reconnect=True) |
| 842 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 843 | |
| 844 | l1.fundchannel(l2, 10**6) |
| 845 | |
| 846 | amt = 200000000 |
| 847 | inv = l2.rpc.invoice(amt, 'testpayment', 'desc') |
| 848 | rhash = inv['payment_hash'] |
| 849 | assert only_one(l2.rpc.listinvoices('testpayment')['invoices'])['status'] == 'unpaid' |
| 850 | |
| 851 | route = [{'amount_msat': amt, 'id': l2.info['id'], 'delay': 5, 'channel': first_scid(l1, l2)}] |
| 852 | |
| 853 | # This will send commit, so will reconnect as required. |
| 854 | l1.rpc.sendpay(route, rhash, payment_secret=inv['payment_secret']) |
| 855 | # Should have printed this for every reconnect. |
| 856 | for i in range(0, len(disconnects)): |
| 857 | l1.daemon.wait_for_log('Already have funding locked in') |
| 858 | |
| 859 | |
| 860 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected