We ask for invoice, but reply path doesn't lead directly from recipient
(node_factory, bitcoind)
| 4941 | |
| 4942 | |
| 4943 | def test_fetchinvoice_disconnected_reply(node_factory, bitcoind): |
| 4944 | """We ask for invoice, but reply path doesn't lead directly from recipient""" |
| 4945 | l1, l2, l3 = node_factory.get_nodes(3, |
| 4946 | opts={'may_reconnect': True, |
| 4947 | 'dev-no-reconnect': None, |
| 4948 | 'dev-allow-localhost': None}) |
| 4949 | l3.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 4950 | |
| 4951 | # Make l1, l2 public (so l3 can auto connect). |
| 4952 | node_factory.join_nodes([l1, l2], wait_for_announce=True) |
| 4953 | # Make sure l3 knows about l1's public address |
| 4954 | wait_for(lambda: ['addresses' in n for n in l3.rpc.listnodes()['nodes']] == [True] * 2) |
| 4955 | |
| 4956 | offer = l3.rpc.offer(amount='5msat', description='test_fetchinvoice_disconnected_reply') |
| 4957 | |
| 4958 | # l2 is already connected to l3, so it can fetch. It specifies a reply |
| 4959 | # path of l1->l2. l3 knows it can simply route reply to l1 via l2. |
| 4960 | l2.rpc.call('fetchinvoice', {'offer': offer['bolt12'], 'dev_reply_path': [l1.info['id'], l2.info['id']]}) |
| 4961 | assert l3.rpc.listpeers(l1.info['id']) == {'peers': []} |
| 4962 | |
| 4963 | |
| 4964 | def test_pay_blockheight_mismatch(node_factory, bitcoind): |