mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
multi: remove ErrDoubleSpend check for PublishTransaction
In this commit, we address a lingering issue within some subsystems that are responsible for broadcasting transactions. Previously, ErrDoubleSpend indicated that a transaction was already included in the mempool/chain. This error was then modified to actually be returned for conflicting transactions, but its callers were not modified accordingly. This would lead to conflicting transactions to be interpreted as valid, when they shouldn't be.
This commit is contained in:
@@ -2,7 +2,6 @@ package lookout
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
)
|
||||
|
||||
// PunisherConfig houses the resources required by the Punisher.
|
||||
@@ -44,7 +43,7 @@ func (p *BreachPunisher) Punish(desc *JusticeDescriptor, quit <-chan struct{}) e
|
||||
desc.SessionInfo.ID, justiceTxn.TxHash())
|
||||
|
||||
err = p.cfg.PublishTx(justiceTxn)
|
||||
if err != nil && err != lnwallet.ErrDoubleSpend {
|
||||
if err != nil {
|
||||
log.Errorf("Unable to publish justice txn for client=%s"+
|
||||
"with breach-txid=%s: %v",
|
||||
desc.SessionInfo.ID, desc.BreachedCommitTx.TxHash(), err)
|
||||
|
||||
Reference in New Issue
Block a user