Skip to content

Commit dc846dc

Browse files
committed
WIP: pytest: Test that we remember learnt channel hints across payments
1 parent 6681a78 commit dc846dc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_pay.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5966,3 +5966,20 @@ def test_fetch_no_description_with_amount(node_factory):
59665966
err = r'description is required for the user to know what it was they paid for'
59675967
with pytest.raises(RpcError, match=err) as err:
59685968
_ = l2.rpc.call('offer', {'amount': '2msat'})
5969+
5970+
5971+
def test_pay_remember_hint(node_factory):
5972+
"""Build a diamond, with a cheap route, that is exhausted. The
5973+
first payment should try that route first, learn it's exhausted,
5974+
and then succeed over the other leg. The second, unrelated,
5975+
payment should immediately skip the exhausted leg and go for the
5976+
more expensive one.
5977+
5978+
```mermaid
5979+
graph LR
5980+
Sender -- "propfee=1\nexhausted" --> Forwarder1
5981+
Forwarder1 -- "propfee=1" --> Recipient
5982+
Sender -- "propfee=50" --> Forwarder2
5983+
Forwarder2 -- "propfee=1" --> Recipient
5984+
```
5985+
"""

0 commit comments

Comments
 (0)