Skip to content

Commit 5ba5546

Browse files
committed
pytest: fix flake in test_fetchinvoice
The sleep was simply allowing gossip to propagate, so (sometimes) l4 can connect to l3/l1. We really want to suppress the blinded path on l2: ``` 2025-03-03T05:25:16.6928072Z > l4.rpc.call('fetchinvoice', {'offer': offer3['bolt12']}) 2025-03-03T05:25:16.6928280Z 2025-03-03T05:25:16.6928367Z tests/test_pay.py:4540: 2025-03-03T05:25:16.6928609Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2025-03-03T05:25:16.6928929Z contrib/pyln-testing/pyln/testing/utils.py:760: in call ... 2025-03-03T05:25:16.6956050Z E pyln.client.lightning.RpcError: RPC call failed: method: fetchinvoice, payload: {'offer': 'lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyqs5pn0venx2u3nzrhqxhftzxfdlwsnfcgw2sy8t5mxa0ytcdfat2nkdwqvpy9nnsa9mzzaqfwys22njn0v5g3jswhdh684hnlnkvd5pme28q5hgyyhshhmntd6qqsz40a4renm8a94r9xf5eez73ygcmendmd9utwmx0kzlp0lwd9sq98sqvutrneuljglxekynj2wdhpsa36ra3ae7uql9g79w9qqc0rqrunkystxgsz2reyay8hdtzwjew38w2u4xavpq2fm360hd75pkyuhpar0adgu93z8gn0jsyxganyhelch7savw6vrgqpj80cdc5qkwkaz0dk65cwyatgmhszpv72axqz6ldvcjq9crzevzpd3aeet607hq7sk0fvz0musdn7r96w6zcssytfzxcs2xkdy0lml0tzy0jzugmyj8kjn8zfzrgq9fsgurc72x82e'}, error: {'code': 1003, 'message': 'Failed: could not route or connect directly to blinded path at 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d: {"code":400,"message":"Unable to connect, no address known for peer"}'} ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 04b21c3 commit 5ba5546

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_pay.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4437,7 +4437,7 @@ def test_fetchinvoice(node_factory, bitcoind):
44374437
# We remove the conversion plugin on l3, causing it to get upset.
44384438
l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True,
44394439
opts=[{},
4440-
{},
4440+
{'dev-allow-localhost': None},
44414441
{'broken_log': "plugin-offers: Failed invreq.*Unknown command 'currencyconvert'",
44424442
'dev-allow-localhost': None}])
44434443

@@ -4535,7 +4535,6 @@ def test_fetchinvoice(node_factory, bitcoind):
45354535
'description': 'offer3'})
45364536
l4 = node_factory.get_node()
45374537
l4.rpc.connect(l2.info['id'], 'localhost', l2.port)
4538-
time.sleep(0.25)
45394538
# ... even if we can't find ourselves.
45404539
l4.rpc.call('fetchinvoice', {'offer': offer3['bolt12']})
45414540
# ... even if we know it from gossmap

0 commit comments

Comments
 (0)