mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-30 04:32:33 +02:00
In this commit, we modify the interaction between the chanCloser sub-system and the chain notifier all together. This fixes a series of bugs as before this commit, we wouldn’t be able to detect if the remote party actually broadcasted *any* of the transactions that we signed off upon. This would be rejected to the user by having a “zombie” channel close that would never actually be resolved. Rather than the chanCloser watching for on-chain closes, we’ll now open up a co-op close context to the chainWatcher (via a layer of indirection via the ChainArbitrator), and report to it all possible closes that we’ve signed. The chainWatcher will then be able to launch a goroutine to properly update the database state once any of the possible closure transactions confirms.