Fix bogus `Event::PaymentSent` serialization 2021-06-fix-broken-event-ser
authorMatt Corallo <git@bluematt.me>
Mon, 28 Jun 2021 23:31:29 +0000 (23:31 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 28 Jun 2021 23:38:09 +0000 (23:38 +0000)
`Event::PaymentSent` serialization has a bug where we
double-serialize the payment_preimage field but do not attempt to
read it twice. This results in a failure to read `ChannelManager`s
from disk if we have a pending `Event::PaymentSent` pending
awaiting handling when we serialize.

Instead of attempting to read both versions, we opt to simply fix
the serialization, assuming it is exceedingly rare for such a
scenario to appear (and if it does, we can assist in manual
recovery).

The release notes have been updated to note this inconsistency.

Found by the chanmon_consistency fuzz target.


No differences found