mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
pytest: fix flake in test_bolt11_null_after_pay
It's possible that l2 hasn't completely processed the connection yet: ``` # create l2->l1 channel. l2.fundwallet(amount_sat * 5) l1.rpc.connect(l2.info['id'], 'localhost', l2.port) > l2.rpc.fundchannel(l1.info['id'], amount_sat * 3) tests/test_pay.py:3974: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ contrib/pyln-client/pyln/client/lightning.py:833: in fundchannel return self.call("fundchannel", payload) contrib/pyln-testing/pyln/testing/utils.py:706: in call res = LightningRpc.call(self, method, payload, cmdprefix, filter) ... E pyln.client.lightning.RpcError: RPC call failed: method: fundchannel, payload: {'id': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518', 'amount': 3000000, 'announce': True}, error: {'code': 400, 'message': 'Unable to connect, no address known for peer', 'data': {'id': '0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518', 'method': 'connect'}} contrib/pyln-client/pyln/client/lightning.py:422: RpcError ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
4342043382
commit
28b31c19dd
1 changed files with 2 additions and 0 deletions
|
@ -3971,6 +3971,8 @@ def test_bolt11_null_after_pay(node_factory, bitcoind):
|
||||||
# create l2->l1 channel.
|
# create l2->l1 channel.
|
||||||
l2.fundwallet(amount_sat * 5)
|
l2.fundwallet(amount_sat * 5)
|
||||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||||
|
# Make sure l2 considers it fully connected too!
|
||||||
|
wait_for(lambda: l2.rpc.listpeers(l1.info['id']) != {'peers': []})
|
||||||
l2.rpc.fundchannel(l1.info['id'], amount_sat * 3)
|
l2.rpc.fundchannel(l1.info['id'], amount_sat * 3)
|
||||||
|
|
||||||
# Let the channel confirm.
|
# Let the channel confirm.
|
||||||
|
|
Loading…
Add table
Reference in a new issue