Skip to content

Commit c83bc3b

Browse files
committed
staticaddr: re-register for block conf on error
1 parent 9a03083 commit c83bc3b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

staticaddr/loopin/actions.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,14 @@ func (f *FSM) MonitorInvoiceAndHtlcTxAction(ctx context.Context,
665665
case err = <-blockChanErr:
666666
f.Errorf("block subscription error: %v", err)
667667

668-
return f.HandleError(err)
668+
// Re-register for block notifications.
669+
blockChan, blockChanErr, err = registerBlocks(ctx)
670+
if err != nil {
671+
err = fmt.Errorf("unable to subscribe to "+
672+
"new blocks: %v", err)
673+
674+
return f.HandleError(err)
675+
}
669676

670677
case update := <-invoiceUpdateChan:
671678
switch update.State {

0 commit comments

Comments
 (0)