mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-12 22:59:38 +02:00
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:
@@ -293,7 +293,7 @@ func testJusticeDescriptor(t *testing.T, blobType blob.Type) {
|
||||
// over the buffered channel.
|
||||
publications := make(chan *wire.MsgTx, 1)
|
||||
punisher := lookout.NewBreachPunisher(&lookout.PunisherConfig{
|
||||
PublishTx: func(tx *wire.MsgTx) error {
|
||||
PublishTx: func(tx *wire.MsgTx, _ string) error {
|
||||
publications <- tx
|
||||
return nil
|
||||
},
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
type PunisherConfig struct {
|
||||
// PublishTx provides the ability to send a signed transaction to the
|
||||
// network.
|
||||
PublishTx func(*wire.MsgTx) error
|
||||
PublishTx func(*wire.MsgTx, string) error
|
||||
|
||||
// TODO(conner) add DB tracking and spend ntfn registration to see if
|
||||
// ours confirmed or not
|
||||
@@ -42,7 +42,7 @@ func (p *BreachPunisher) Punish(desc *JusticeDescriptor, quit <-chan struct{}) e
|
||||
log.Infof("Publishing justice transaction for client=%s with txid=%s",
|
||||
desc.SessionInfo.ID, justiceTxn.TxHash())
|
||||
|
||||
err = p.cfg.PublishTx(justiceTxn)
|
||||
err = p.cfg.PublishTx(justiceTxn, "")
|
||||
if err != nil {
|
||||
log.Errorf("Unable to publish justice txn for client=%s"+
|
||||
"with breach-txid=%s: %v",
|
||||
|
Reference in New Issue
Block a user