1
0

lnworker: add invoice features to PaymentInfo class

Adds the invoice features to the `PaymentInfo` class so we can check if
the sender respects our requested features (e.g. if they tried to send
mpp if we requested no mpp).
This commit is contained in:
f321x
2025-12-09 14:31:12 +01:00
parent 5be598b808
commit 125a921cc4
3 changed files with 53 additions and 21 deletions

View File

@@ -359,6 +359,9 @@ class MockLNWallet(Logger, EventListener, NetworkRetryManager[LNPeerAddr]):
is_payment_bundle_complete = LNWallet.is_payment_bundle_complete
delete_payment_bundle = LNWallet.delete_payment_bundle
_process_htlc_log = LNWallet._process_htlc_log
_get_invoice_features = LNWallet._get_invoice_features
receive_requires_jit_channel = LNWallet.receive_requires_jit_channel
can_get_zeroconf_channel = LNWallet.can_get_zeroconf_channel
class MockTransport:
@@ -594,6 +597,7 @@ class TestPeer(ElectrumTestCase):
status=PR_UNPAID,
min_final_cltv_delta=min_final_cltv_delta,
expiry_delay=expiry or LN_EXPIRY_NEVER,
invoice_features=invoice_features,
)
w2.save_payment_info(info)
lnaddr1 = LnAddr(