0b2c7a8a38
"When should we reveal preimages onchain?" This commit tries to simplify the thinking by making the observation: - we can reveal preimages (actually in any context) if they are already public - a preimage is public if any other lightning node knows it besides us - if we learn the preimage from another LN node, it is public - if we send update_fulfill_htlc, it becomes public - if we see a preimage onchain, it is public - in lnsweep._maybe_reveal_preimage_for_htlc: - partial mpp check is not relevant if preimage is already public - let's just always do KeepWatchingTXO, for sanity/safety Co-authored-by: ThomasV <thomasv@electrum.org>