mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 17:55:36 +01:00
lnwallet: add CancelRebroadcast method.
Adding the ability to stop rebroadcasting a transaction. This is useful when we want to abandon a channel and grantee that this transaction will not confirm accidentally.
This commit is contained in:
parent
bf5aab9d52
commit
2708626d62
1 changed files with 9 additions and 0 deletions
|
@ -2315,6 +2315,15 @@ func (l *LightningWallet) ValidateChannel(channelState *channeldb.OpenChannel,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CancelRebroadcast cancels the rebroadcast of the given transaction.
|
||||||
|
func (l *LightningWallet) CancelRebroadcast(txid chainhash.Hash) {
|
||||||
|
// For neutrino, we don't config the rebroadcaster for the wallet as it
|
||||||
|
// manages the rebroadcasting logic in neutrino itself.
|
||||||
|
if l.Cfg.Rebroadcaster != nil {
|
||||||
|
l.Cfg.Rebroadcaster.MarkAsConfirmed(txid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CoinSource is a wrapper around the wallet that implements the
|
// CoinSource is a wrapper around the wallet that implements the
|
||||||
// chanfunding.CoinSource interface.
|
// chanfunding.CoinSource interface.
|
||||||
type CoinSource struct {
|
type CoinSource struct {
|
||||||
|
|
Loading…
Add table
Reference in a new issue