mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
staticaddr: clear stale HTLC confs on re-register
- 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
This commit is contained in:
parent
f6ac0b5ebe
commit
258d33cce5
1 changed files with 4 additions and 0 deletions
|
|
@ -575,6 +575,10 @@ func (f *FSM) MonitorInvoiceAndHtlcTxAction(ctx context.Context,
|
|||
f.Errorf("htlc tx conf chan error, re-registering: "+
|
||||
"%v", err)
|
||||
|
||||
// A previous confirmation may no longer be valid if the
|
||||
// subscription failed, so reset and wait for a fresh one.
|
||||
htlcConfirmed = false
|
||||
|
||||
// Re-register for htlc confirmation.
|
||||
htlcConfChan, htlcErrConfChan, err = registerHtlcConf()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue