mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pytest: disable automatic reconnection.
We seem to hit a race between manual reconnect (with address hint) and an automatic
reconnection attempt which fails:
```
> l4.rpc.connect(l3.info['id'], 'localhost', l3.port)
...
E pyln.client.lightning.RpcError: RPC call failed: method: connect, payload: {'id': '035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d', 'host': 'localhost', 'port': 41285}, error: {'code': 401, 'message': 'All addresses failed: 127.0.0.1:36678: Connection establishment: Connection refused. '}
```
See how it didn't even try the given address?
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -4348,7 +4348,8 @@ def test_offer(node_factory, bitcoind):
|
||||
def test_fetchinvoice_3hop(node_factory, bitcoind):
|
||||
l1, l2, l3, l4 = node_factory.line_graph(4, wait_for_announce=True,
|
||||
opts={'experimental-offers': None,
|
||||
'may_reconnect': True})
|
||||
'may_reconnect': True,
|
||||
'dev-no-reconnect': None})
|
||||
offer1 = l4.rpc.call('offer', {'amount': '2msat',
|
||||
'description': 'simple test'})
|
||||
assert offer1['created'] is True
|
||||
@@ -4999,7 +5000,8 @@ def test_sendpay_grouping(node_factory, bitcoind):
|
||||
invoices = l3.rpc.listinvoices()['invoices']
|
||||
assert(len(invoices) == 1)
|
||||
assert(invoices[0]['status'] == 'unpaid')
|
||||
l3.connect(l2)
|
||||
# Will reconnect automatically
|
||||
wait_for(lambda: only_one(l3.rpc.listpeers()['peers'])['connected'] is True)
|
||||
scid = l3.rpc.listpeers()['peers'][0]['channels'][0]['short_channel_id']
|
||||
wait_for(lambda: [c['active'] for c in l1.rpc.listchannels(scid)['channels']] == [True, True])
|
||||
l1.rpc.pay(inv, msatoshi='420000msat')
|
||||
|
||||
Reference in New Issue
Block a user