mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 15:20:24 +01:00
Currently, if a channel's funding is locked in and then later reorg'd back to half of the channel's minimum-depth we will immediately force-close the channel. However, this can happen at the fork-point while processing a reorg, and generally reorgs do not reduce the block height at all, making this a rather useless endeavor. Ideally we'd never auto-force-close channels at all due to a reorg, instead simply marking it as inactive until the funding transaction is re-confirmed (or allowing the user to attempt to force-close or force-closing once we're confident we have completed reorg processing if we're at risk of losing funds already received in the channel). Sadly, we currently do not support changing a channel's SCID and updating our SCID maps, so we cannot yet remove the automated force-close logic. Still, there is no reason to do it until a funding transaction has been removed from the chain. This implements that change - only force-closeing once a channel's funding transaction has been reorg'd out (still potentially at a reorg's fork point). This continues to imply a 1-confirmation channel will always be force-closed after a reorg of the funding transaction, and will imply a similar behavior with 0-conf channels. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |