2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-04 06:00:21 +00:00

Merge pull request #725 from bhandras/swap-info-fixup

loop: fill the correct HTLC in loopout update
This commit is contained in:
András Bánki-Horváth 2024-03-21 15:53:43 +01:00 committed by GitHub
commit 6ac6ee0549
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -306,7 +306,11 @@ func (s *loopOutSwap) sendUpdate(ctx context.Context) error {
info := s.swapInfo()
s.log.Infof("Loop out swap state: %v", info.State)
info.HtlcAddressP2WSH = s.htlc.Address
if s.htlc.OutputType == swap.HtlcP2WSH {
info.HtlcAddressP2WSH = s.htlc.Address
} else {
info.HtlcAddressP2TR = s.htlc.Address
}
// In order to avoid potentially dangerous ownership sharing
// we copy the outgoing channel set.