cln-nip47/tests
daywalker90 b31f42691f fix unaccepted hold invoices in the accepted handler
holdinvoice_accepted_handler waited on the hold plugin track stream and
sent a HoldInvoiceAccepted notification afterwards, without checking the
reason the stream ended. When an invoice was cancelled, the stream just closes and the handler still sent
a spurious accepted notification.

Only send the notification if the stream actually reported the invoice
as accepted.

The hold plugin has no expired state: an invoice that expires without
ever being accepted stays Unpaid and the track stream never ends, so the
handler previously hung forever, holding a task and a gRPC stream open.

Pass the invoice's expiry into the handler and time out the track stream
at that point (capped), so it gives up on expired invoices and never
sends a spurious accepted notification. When re-spawning pending
invoices at startup, derive the expiry from the decoded bolt11.

Add test_hold_invoice_expiry which creates an invoice with a short
expiry and asserts the handler gives up without sending the notification.
2026-08-09 15:39:01 +02:00
..
config.toml add support for holdinvoices 2026-08-08 15:06:37 +02:00
conftest.py tests: remove relay terminate delay again 2026-01-22 12:43:34 +01:00
nostr-rs-relay.tar.gz tests: use nostr-rs-relay instead of nostr_relay 2025-12-31 23:56:36 +01:00
pyproject.toml tests: update to nostr sdk 0.45 2026-08-08 15:06:37 +02:00
setup.sh add support for holdinvoices 2026-08-08 15:06:37 +02:00
test_cln-nip47.py fix unaccepted hold invoices in the accepted handler 2026-08-09 15:39:01 +02:00
util.py add support for holdinvoices 2026-08-08 15:06:37 +02:00
uv.lock tests: update to nostr sdk 0.45 2026-08-08 15:06:37 +02:00