sweep: add label to sweep transactions
This commit is contained in:
1 file changed
+4
-1
+4
-1
@@ -15,6 +15,7 @@ import (
|
|||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||||
"github.com/lightningnetwork/lnd/input"
|
"github.com/lightningnetwork/lnd/input"
|
||||||
|
"github.com/lightningnetwork/lnd/labels"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||||
)
|
)
|
||||||
@@ -1237,7 +1238,9 @@ func (s *UtxoSweeper) sweep(inputs inputSet, feeRate chainfee.SatPerKWeight,
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
err = s.cfg.Wallet.PublishTransaction(tx, "")
|
err = s.cfg.Wallet.PublishTransaction(
|
||||||
|
tx, labels.MakeLabel(labels.LabelTypeSweepTransaction, nil),
|
||||||
|
)
|
||||||
|
|
||||||
// In case of an unexpected error, don't try to recover.
|
// In case of an unexpected error, don't try to recover.
|
||||||
if err != nil && err != lnwallet.ErrDoubleSpend {
|
if err != nil && err != lnwallet.ErrDoubleSpend {
|
||||||
|
|||||||
Reference in new issue
Block a user