@@ -14,6 +14,7 @@ import (
1414 "github.com/btcsuite/btcd/chaincfg/chainhash"
1515 "github.com/btcsuite/btcd/wire"
1616 "github.com/lightninglabs/lndclient"
17+ "github.com/lightninglabs/loop/labels"
1718 "github.com/lightninglabs/loop/loopdb"
1819 "github.com/lightninglabs/loop/swap"
1920 "github.com/lightningnetwork/lnd/chainntnfs"
@@ -652,12 +653,11 @@ func (s *loopInSwap) publishOnChainHtlc(ctx context.Context) (bool, error) {
652653 s .log .Infof ("Publishing on chain HTLC with fee rate %v" , feeRate )
653654
654655 // Internal loop-in is always P2WSH.
655- tx , err := s .lnd .WalletKit .SendOutputs (ctx ,
656- []* wire.TxOut {{
656+ tx , err := s .lnd .WalletKit .SendOutputs (
657+ ctx , []* wire.TxOut {{
657658 PkScript : s .htlcP2WSH .PkScript ,
658659 Value : int64 (s .LoopInContract .AmountRequested ),
659- }},
660- feeRate ,
660+ }}, feeRate , labels .LoopInHtlcLabel (swap .ShortHash (& s .hash )),
661661 )
662662 if err != nil {
663663 return false , fmt .Errorf ("send outputs: %v" , err )
@@ -874,7 +874,10 @@ func (s *loopInSwap) publishTimeoutTx(ctx context.Context,
874874 s .log .Infof ("Publishing timeout tx %v with fee %v to addr %v" ,
875875 timeoutTxHash , fee , s .timeoutAddr )
876876
877- err = s .lnd .WalletKit .PublishTransaction (ctx , timeoutTx )
877+ err = s .lnd .WalletKit .PublishTransaction (
878+ ctx , timeoutTx ,
879+ labels .LoopInSweepTimeout (swap .ShortHash (& s .hash )),
880+ )
878881 if err != nil {
879882 s .log .Warnf ("publish timeout: %v" , err )
880883 }
0 commit comments