Skip to content

Commit

Permalink
pytest: fix flake in test_fetchinvoice_disconnected_reply.
Browse files Browse the repository at this point in the history
Fails when l3 doesn't know address for l1, to connect to it:

```
2024-11-16T04:45:42.2243366Z lightningd-3 2024-11-16T04:35:10.582Z DEBUG   022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-connectd: peer_in WIRE_ONION_MESSAGE
2024-11-16T04:45:42.2244342Z lightningd-3 2024-11-16T04:35:10.582Z DEBUG   lightningd: Got onionmsg reply_path
2024-11-16T04:45:42.2245398Z lightningd-3 2024-11-16T04:35:10.582Z DEBUG   plugin-offers: Note: disallowing deprecated onion_message_recv.blinding
2024-11-16T04:45:42.2246408Z lightningd-3 2024-11-16T04:35:10.586Z UNUSUAL plugin-offers: No incoming channel for 5msat, so no blinded path
2024-11-16T04:45:42.2247289Z lightningd-3 2024-11-16T04:35:10.605Z DEBUG   hsmd: Client: Received message 25 from client
2024-11-16T04:45:42.2248372Z lightningd-3 2024-11-16T04:35:10.606Z DEBUG   plugin-offers: connecting directly to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518
2024-11-16T04:45:42.2249451Z lightningd-3 2024-11-16T04:35:10.606Z DEBUG   gossipd: REPLY WIRE_GOSSIPD_GET_ADDRS_REPLY with 0 fds
2024-11-16T04:45:42.2250743Z lightningd-3 2024-11-16T04:35:10.607Z DEBUG   0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Failed connected out: Unable to connect, no address known for peer
```

This is because the test which was supposed to wait for addresses is
wrong: it passes when l3 knows nothing!  (`all([])` == `True`)

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Nov 17, 2024
1 parent 9d275a5 commit a0f20de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_pay.py
Original file line number Diff line number Diff line change
Expand Up @@ -4746,7 +4746,7 @@ def test_fetchinvoice_disconnected_reply(node_factory, bitcoind):
# Make l1, l2 public (so l3 can auto connect).
node_factory.join_nodes([l1, l2], wait_for_announce=True)
# Make sure l3 knows about l1's public address
wait_for(lambda: all(['addresses' in n for n in l3.rpc.listnodes()['nodes']]))
wait_for(lambda: ['addresses' in n for n in l3.rpc.listnodes()['nodes']] == [True] * 2)

offer = l3.rpc.offer(amount='5msat', description='test_fetchinvoice_disconnected_reply')

Expand Down

0 comments on commit a0f20de

Please sign in to comment.