File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -406,20 +406,19 @@ func (s *loopInSwap) waitForHtlcConf(globalCtx context.Context) (
406
406
return nil , err
407
407
}
408
408
409
- for {
409
+ var conf * chainntnfs.TxConfirmation
410
+ for conf == nil {
410
411
select {
411
412
412
413
// P2WSH htlc confirmed.
413
- case conf : = <- confChanP2WSH :
414
+ case conf = <- confChanP2WSH :
414
415
s .htlc = s .htlcP2WSH
415
416
s .log .Infof ("P2WSH htlc confirmed" )
416
- return conf , nil
417
417
418
418
// NP2WSH htlc confirmed.
419
- case conf : = <- confChanNP2WSH :
419
+ case conf = <- confChanNP2WSH :
420
420
s .htlc = s .htlcNP2WSH
421
421
s .log .Infof ("NP2WSH htlc confirmed" )
422
- return conf , nil
423
422
424
423
// Conf ntfn error.
425
424
case err := <- confErrP2WSH :
@@ -438,6 +437,8 @@ func (s *loopInSwap) waitForHtlcConf(globalCtx context.Context) (
438
437
return nil , globalCtx .Err ()
439
438
}
440
439
}
440
+
441
+ return conf , nil
441
442
}
442
443
443
444
// publishOnChainHtlc checks whether there are still enough blocks left and if
You can’t perform that action at this time.
0 commit comments