multi: update WalletController PublishTransaction to include label

Add label parameter to PublishTransaction in WalletController
interface. A labels package is added to store generic labels that are
used for the different types of transactions that are published by lnd.

To keep commit size down, the two endpoints that require a label
parameter be passed down have a todo added, which will be removed in
subsequent commits.
This commit is contained in:
carla committed 2020-05-19 13:30:00 +02:00
1 parent c2516d9352
commit 75370ce6b4
25 files changed
+74 -52

No files matched your search

+2 -2
View File
@@ -433,8 +433,8 @@ func (b *BtcWallet) ListUnspentWitness(minConfs, maxConfs int32) (
// publishing the transaction fails, an error describing the reason is returned
// (currently ErrDoubleSpend). If the transaction is already published to the
// network (either in the mempool or chain) no error will be returned.
func (b *BtcWallet) PublishTransaction(tx *wire.MsgTx) error {
if err := b.wallet.PublishTransaction(tx, ""); err != nil {
func (b *BtcWallet) PublishTransaction(tx *wire.MsgTx, label string) error {
if err := b.wallet.PublishTransaction(tx, label); err != nil {
// If we failed to publish the transaction, check whether we
// got an error of known type.