Add a TODO for an important issue for making async mon updates safe
authorMatt Corallo <git@bluematt.me>
Tue, 16 Aug 2022 21:58:06 +0000 (21:58 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 29 Sep 2022 20:27:53 +0000 (20:27 +0000)
commit72416b951e64bb51577f63937eed429a29b563e7
treede60c8ea5ae6183764bd6c6a53b5bb3bc27eb1e4
parent12fa0b11a669050bc3e0e081bea0523baa1598ff
Add a TODO for an important issue for making async mon updates safe

If we receive a monitor event from a forwarded-to channel which
contains a preimage for an HTLC, we have to propogate that preimage
back to the forwarded-from channel monitor. However, once we have
that update, we're running in a relatively unsafe state - we have
the preimage in memory, but if we were to crash the forwarded-to
channel monitor will not regenerate the update with the preimage
for us. If we haven't managed to write the monitor update to the
forwarded-from channel by that point, we've lost the preimage, and,
thus, money!
lightning/src/ln/channelmanager.rs