Skip to content

Commit 6ac6ee0

Browse files
authored
Merge pull request #725 from bhandras/swap-info-fixup
loop: fill the correct HTLC in loopout update
2 parents c3371fe + 06fd21f commit 6ac6ee0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

loopout.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ func (s *loopOutSwap) sendUpdate(ctx context.Context) error {
306306
info := s.swapInfo()
307307
s.log.Infof("Loop out swap state: %v", info.State)
308308

309-
info.HtlcAddressP2WSH = s.htlc.Address
309+
if s.htlc.OutputType == swap.HtlcP2WSH {
310+
info.HtlcAddressP2WSH = s.htlc.Address
311+
} else {
312+
info.HtlcAddressP2TR = s.htlc.Address
313+
}
310314

311315
// In order to avoid potentially dangerous ownership sharing
312316
// we copy the outgoing channel set.

0 commit comments

Comments
 (0)