Since lnd 0.16.0 the rebroadcaster was implemented, though there might be a small inconvenient bug, filling the log files.
In case the anchor output is spent by a third party we wanna make sure we back-propagate this info also to the rebroadcaster so that it removes the tx from its "rebroadcast-transaction". Currently the rebroadcaster registers a sweep and although the sweep (anchor-sweep) is already invalid the backend tries to rebroadcast it continuously (1min)
Since lnd 0.16.0 the rebroadcaster was implemented, though there might be a small inconvenient bug, filling the log files. In case the anchor output is spent by a third party we wanna make sure we back-propagate this info also to the rebroadcaster so that it removes the tx from its "rebroadcast-transaction". Currently the rebroadcaster registers a sweep and although the sweep (anchor-sweep) is already invalid the backend tries to rebroadcast it continuously (1min)
My analysis lead me to the following outcome:
The sweeper registers the sweep here:
https://github.com/lightningnetwork/lnd/blob/master/lnwallet/wallet.go#L480
https://github.com/lightninglabs/neutrino/blob/master/pushtx/broadcaster.go#L180
Then the rebroadcaster does its job here (after the timer kicks in):
https://github.com/lightninglabs/neutrino/blob/master/pushtx/broadcaster.go#L180
And now the problem lies here:
https://github.com/lightninglabs/neutrino/blob/master/pushtx/broadcaster.go#L213
We only remove transactions from the queue/array if they are confirmed:
https://github.com/lightninglabs/neutrino/blob/master/pushtx/broadcaster.go#L245
What I think is needed something like:
Happy to hear your thought about my observation
Your environment
lnd
: 0.16Example Log of lnd(repeating itself every DefaultRebroadcastInterval = time.Minute):
Restarting lnd fixes the problem but would be cool to have the solution as presented above maybe?