Skip to content

Commit d47b188

Browse files
rustyrussellendothermicdev
authored andcommitted
pytest: add a test that we don't use an offline peer for offer paths.
Signed-off-by: Rusty Russell <[email protected]>
1 parent c92c384 commit d47b188

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_pay.py

+6
Original file line numberDiff line numberDiff line change
@@ -5679,6 +5679,7 @@ def test_blindedpath_privchan(node_factory, bitcoind):
56795679
l1.rpc.pay(inv['invoice'])
56805680

56815681

5682+
@pytest.mark.xfail(strict=True)
56825683
def test_blindedpath_noaddr(node_factory, bitcoind):
56835684
l1, l2 = node_factory.line_graph(2, wait_for_announce=True,
56845685
opts={'dev-allow-localhost': None})
@@ -5697,6 +5698,11 @@ def test_blindedpath_noaddr(node_factory, bitcoind):
56975698
offer = l2.rpc.offer(1000, 'test_pay_blindedpath_nodeaddr')
56985699
assert 'offer_paths' not in l1.rpc.decode(offer['bolt12'])
56995700

5701+
# If l2 is disconnected, l3 will *not* add a blinded path.
5702+
l2.rpc.disconnect(l3.info['id'], force=True)
5703+
offer = l3.rpc.offer(1000, 'test_pay_blindedpath_nodeaddr2')
5704+
assert 'offer_paths' not in l1.rpc.decode(offer['bolt12'])
5705+
57005706

57015707
def test_blinded_reply_path_scid(node_factory):
57025708
"""Check that we handle a blinded path which begins with a scid instead of a nodeid"""

0 commit comments

Comments
 (0)