11from gltesting .fixtures import *
22from pyln .testing .utils import wait_for
33from pyln import grpc as clnpb
4+ import grpc
45import pytest
56import secrets
67from pathlib import Path
@@ -92,7 +93,7 @@ def test_trampoline_pay(bitcoind, clients, node_factory):
9293
9394 res = n1 .trampoline_pay (inv ["bolt11" ], bytes .fromhex (l2 .info ["id" ]))
9495 assert res
95- assert len (res .payment_hash ) == 32 # There was a confusion about hex/bytes return.
96+ assert len (res .payment_hash ) == 32 # There was a confusion about hex/bytes return.
9697
9798 l2 .rpc .unsetchecks ()
9899
@@ -124,7 +125,9 @@ def test_trampoline_pay(bitcoind, clients, node_factory):
124125
125126 # calling `trampoline_pay` with an unkown tmrp_node_id must fail.
126127 with pytest .raises (
127- expected_exception = ValueError , match = r"Peer error: No such peer"
128+ expected_exception = ValueError ,
129+
130+ match = f"Unknown peer { l3 .info ['id' ]} " ,
128131 ):
129132 res = n1 .trampoline_pay (inv ["bolt11" ], bytes .fromhex (l3 .info ["id" ]))
130133
@@ -134,13 +137,10 @@ def test_trampoline_pay(bitcoind, clients, node_factory):
134137 # trampoline payments must fail.
135138 with pytest .raises (
136139 expected_exception = ValueError ,
137- match = r"Features \\\"[a-f0-9]+\\\" do not contain feature bit 427 " ,
140+ match = "Peer doesn't suport trampoline payments " ,
138141 ):
139142 res = n1 .trampoline_pay (inv ["bolt11" ], bytes .fromhex (l3 .info ["id" ]))
140143
141- res = n1 .listpays ()
142- print (f"LISTPAYS: { res } " )
143-
144144
145145def test_trampoline_multi_htlc (bitcoind , clients , node_factory ):
146146 c1 = clients .new ()
0 commit comments