staticaddr: re-register on htlc tx conf error

This commit is contained in:
Slyghtning 2025-12-15 14:03:24 +01:00
parent 2ed9e5bde6
commit 1dd145bc32
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF

View file

@ -572,7 +572,17 @@ func (f *FSM) MonitorInvoiceAndHtlcTxAction(ctx context.Context,
htlcConfirmed = true
case err = <-htlcErrConfChan:
f.Errorf("htlc tx conf chan error: %v", err)
f.Errorf("htlc tx conf chan error, re-registering: "+
"%v", err)
// Re-register for htlc confirmation.
htlcConfChan, htlcErrConfChan, err = registerHtlcConf()
if err != nil {
err = fmt.Errorf("unable to re-register for "+
"htlc tx confirmation: %w", err)
return f.HandleError(err)
}
case <-reorgChan:
// A reorg happened. We invalidate a previous htlc
@ -582,8 +592,10 @@ func (f *FSM) MonitorInvoiceAndHtlcTxAction(ctx context.Context,
htlcConfChan, htlcErrConfChan, err = registerHtlcConf()
if err != nil {
f.Errorf("unable to monitor htlc tx "+
err = fmt.Errorf("unable to monitor htlc tx "+
"confirmation: %v", err)
return f.HandleError(err)
}
case <-deadlineChan: