sweep: remove conflicted sweep txns from the rebroadcaster

In this commit, we an existing gap in our rebroadcast handling logic. As
is, if we're trying to sweep a transaction and a conflicting transaction
is mined (timeout lands on chain, anchor swept), then we'll continue to
try to rebroadcast the tx in the background.

To resolve this, we give the sweeper a new closure function that it can
use to mark conflicted transactions as no longer requiring rebroadcast.
This commit is contained in:
Olaoluwa Osuntokun
2023-04-14 14:58:13 -07:00
parent d908becf73
commit 3d2daeefd8
7 changed files with 49 additions and 2 deletions

View File

@ -644,7 +644,7 @@ func proxyBlockEpoch(notifier chainntnfs.ChainNotifier,
}
// walletReBroadcaster is a simple wrapper around the pushtx.Broadcaster
// interface to adhere to the expanded lnwallet.Rebraodcaster interface.
// interface to adhere to the expanded lnwallet.Rebroadcaster interface.
type walletReBroadcaster struct {
started atomic.Bool