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) (
406406 return nil , err
407407 }
408408
409- for {
409+ var conf * chainntnfs.TxConfirmation
410+ for conf == nil {
410411 select {
411412
412413 // P2WSH htlc confirmed.
413- case conf : = <- confChanP2WSH :
414+ case conf = <- confChanP2WSH :
414415 s .htlc = s .htlcP2WSH
415416 s .log .Infof ("P2WSH htlc confirmed" )
416- return conf , nil
417417
418418 // NP2WSH htlc confirmed.
419- case conf : = <- confChanNP2WSH :
419+ case conf = <- confChanNP2WSH :
420420 s .htlc = s .htlcNP2WSH
421421 s .log .Infof ("NP2WSH htlc confirmed" )
422- return conf , nil
423422
424423 // Conf ntfn error.
425424 case err := <- confErrP2WSH :
@@ -438,6 +437,8 @@ func (s *loopInSwap) waitForHtlcConf(globalCtx context.Context) (
438437 return nil , globalCtx .Err ()
439438 }
440439 }
440+
441+ return conf , nil
441442}
442443
443444// publishOnChainHtlc checks whether there are still enough blocks left and if
You can’t perform that action at this time.
0 commit comments