tests: add payer_note case for xpay
What changed, and why it matters
This commit only changes a test file. It updates an existing test case to pass a new optional parameter, payer_note, when calling the xpay command for a BOLT 12 invoice. There is no change to production code, no bug fix, and no security relevance.
No action required. This is a benign test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/test_xpay.py in a single test function. It changes a comment from ‘BOLT 12.’ to ‘BOLT 12 (with payer_note specified).’ and updates the corresponding xpay RPC call to include invstring=b12 and payer_note=’Payment for a cup of coffee’. This is purely a test-coverage addition for an existing xpay feature/parameter.
Changed components
tests/test_xpay.pyInspect captured patch +2 / −2
diff --git a/tests/test_xpay.py b/tests/test_xpay.py
index 94958412..7423a951 100644
--- a/tests/test_xpay.py
+++ b/tests/test_xpay.py
@@ -172,10 +172,10 @@ def test_xpay_simple(node_factory):
b11 = l4.rpc.invoice('10000msat', 'test_xpay_simple', 'test_xpay_simple bolt11')['bolt11']
l1.rpc.xpay(b11)
- # BOLT 12.
+ # BOLT 12 (with payer_note specified).
offer = l3.rpc.offer('any')['bolt12']
b12 = l1.rpc.fetchinvoice(offer, '100000msat')['invoice']
- l1.rpc.xpay(b12)
+ l1.rpc.xpay(invstring=b12, payer_note="Payment for a cup of coffee")
# Failure from l4.
b11 = l4.rpc.invoice('10000msat', 'test_xpay_simple2', 'test_xpay_simple2 bolt11')['bolt11']
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.