Closed ellemouton closed 2 years ago
Also re which "option" this PR took: with the added method those that use the library outside of the lnd+btcwallet interaction can use that method to clean up the main state.
added method those that use the library outside of the lnd+btcwallet interaction can use that method to clean up the main state.
Hmmm but the method is not exposed to them if they just have ChainServices. Should I add a method to ChainServices to expose this method on Broadcaster?
Will need a PR now to the lnd repo to update the go.mod there
Is it fine to point to the latest commit or shall we push a new tag to neutrino?
This PR allows rescan to notify the
ChainServices
broadcaster
that a relevant transaction is confirmed.Fixes #206 using the approach mentioned here
Testing the PR
$ make itest backend=neutrino icase=....
(choose a test that creates a lot of channels) and then look at the logs:[DBG] BTCN: Re-broadcasting %d transactions
will show that the number of txs being rebroadcasted just keeps increasing.replace github.com/lightninglabs/neutrino => github.com/ellemouton/neutrino v0.11.1-0.20210921111409-eb86c412013d
and re-run the same itest. You will see that the number of txs being rebroadcast no longer increases when a tx is confirmed.Fixes https://github.com/lightninglabs/neutrino/issues/206