-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7599 from Roasbeef/sweeper-rebroadcaster-interaction
sweep: remove conflicted sweep txns from the rebroadcaster
- Loading branch information
Showing
7 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package lnd | ||
|
||
import ( | ||
"github.com/btcsuite/btcd/chaincfg/chainhash" | ||
"github.com/lightningnetwork/lnd/lnwallet" | ||
) | ||
|
||
// sweeperWallet is a wrapper around the LightningWallet that implements the | ||
// sweeper's Wallet interface. | ||
type sweeperWallet struct { | ||
*lnwallet.LightningWallet | ||
} | ||
|
||
// newSweeperWallet creates a new sweeper wallet from the given | ||
// LightningWallet. | ||
func newSweeperWallet(w *lnwallet.LightningWallet) *sweeperWallet { | ||
return &sweeperWallet{ | ||
LightningWallet: w, | ||
} | ||
} | ||
|
||
// CancelRebroadcast cancels the rebroadcast of the given transaction. | ||
func (s *sweeperWallet) CancelRebroadcast(txid chainhash.Hash) { | ||
s.Cfg.Rebroadcaster.MarkAsConfirmed(txid) | ||
} |