mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
staticaddr: re-register on htlc tx conf error
This commit is contained in:
parent
2ed9e5bde6
commit
1dd145bc32
1 changed files with 14 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue