mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
sweep: add label to sweep transactions
This commit is contained in:
parent
0a3bc3ee3d
commit
0fc17238cd
1 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue