Skip to content

Conversation

@starius
Copy link

@starius starius commented Dec 16, 2025

Summary

  • handle invoice subscription errors in MonitorInvoiceAndHtlcTx via HandleError so we do not hang when the invoice stream drops
  • reset htlcConfirmed when the HTLC confirmation subscription errors and we re-register, avoiding stale confirmations after a notifier hiccup or reorg
  • add regression tests covering HTLC conf re-registration, invoice subscription errors surfacing, and stale confirmation handling

Testing

  • go test ./staticaddr/loopin -run TestMonitorInvoiceAndHtlcTxReRegistersOnConfErr -count=1
  • go test ./staticaddr/loopin -run TestMonitorInvoiceAndHtlcTxInvoiceErr -count=1
  • go test ./staticaddr/loopin -run TestMonitorInvoiceAndHtlcTxStaleConfirmation -count=1

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

- propagate invoice subscription errors in MonitorInvoiceAndHtlcTx via
  HandleError instead of silently logging
- add regression tests covering HTLC conf re-registration and invoice
  subscription error propagation
- reset htlcConfirmed when the HTLC conf subscription errors and we re-register
- add regression test ensuring re-registers after a conf error require a fresh
  confirmation instead of sweeping on a stale one
Copy link
Owner

@hieblmi hieblmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, nice catches. LGTM

@hieblmi hieblmi merged commit 085bc02 into hieblmi:reregister Dec 17, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants