File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -687,13 +687,21 @@ func (m *Manager) handleWithdrawal(ctx context.Context,
687687 // If the transaction received one confirmation, we
688688 // ensure re-org safety by waiting for some more
689689 // confirmations.
690- var confChan chan * chainntnfs.TxConfirmation
691- confChan , errChan , err =
690+ var (
691+ confChan chan * chainntnfs.TxConfirmation
692+ confErrChan chan error
693+ )
694+ confChan , confErrChan , err =
692695 m .cfg .ChainNotifier .RegisterConfirmationsNtfn (
693696 ctx , spentTx .SpenderTxHash ,
694697 withdrawalPkscript , MinConfs ,
695698 int32 (m .initiationHeight .Load ()),
696699 )
700+ if err != nil {
701+ log .Errorf ("Error registering confirmation " +
702+ "notification: %v" , err )
703+ return
704+ }
697705 select {
698706 case tx := <- confChan :
699707 err = m .cfg .DepositManager .TransitionDeposits (
@@ -722,7 +730,7 @@ func (m *Manager) handleWithdrawal(ctx context.Context,
722730 "withdrawal: %v" , err )
723731 }
724732
725- case err := <- errChan :
733+ case err := <- confErrChan :
726734 log .Errorf ("Error waiting for confirmation: %v" ,
727735 err )
728736
You can’t perform that action at this time.
0 commit comments