diff --git a/libs/gl-testing/tests/test_gl_node.py b/libs/gl-testing/tests/test_gl_node.py index 0c4d69f90..e862da42d 100644 --- a/libs/gl-testing/tests/test_gl_node.py +++ b/libs/gl-testing/tests/test_gl_node.py @@ -141,6 +141,8 @@ def test_configure_close_to_addr(node_factory, clients, bitcoind): l2.rpc.fundchannel(c.node_id.hex(), 'all') bitcoind.generate_block(1, wait_for_mempool=1) + # the channels array is optional + wait_for(lambda: hasattr(gl1.list_peers().peers[0], "channels")) wait_for(lambda: gl1.list_peers().peers[0].channels[0].state == 2 ) diff --git a/libs/gl-testing/tests/test_node.py b/libs/gl-testing/tests/test_node.py index f7d2c8b7c..213aaf3a7 100644 --- a/libs/gl-testing/tests/test_node.py +++ b/libs/gl-testing/tests/test_node.py @@ -163,6 +163,9 @@ def test_node_invoice_amountless(bitcoind, node_factory, clients): amount=clnpb.AmountOrAll(amount=clnpb.Amount(msat=10**9)) ) bitcoind.generate_block(6, wait_for_mempool=1) + + # the channels array is optional + wait_for(lambda: hasattr(gl1.list_peers().peers[0], "channels")) wait_for(lambda: gl1.list_peers().peers[0].channels[0].state == 2) # CHANNELD_NORMAL # Generate an invoice without amount: @@ -201,6 +204,9 @@ def test_node_listpays_preimage(clients, node_factory, bitcoind): amount=clnpb.AmountOrAll(amount=clnpb.Amount(msat=10**9)) ) bitcoind.generate_block(6, wait_for_mempool=1) + + # the channels array is optional + wait_for(lambda: hasattr(gl1.list_peers().peers[0], "channels")) wait_for(lambda: gl1.list_peers().peers[0].channels[0].state == 2) # CHANNELD_NORMAL preimage = "00"*32