Build reminder updates with correct SCID field
authorMatt Corallo <git@bluematt.me>
Sun, 2 Jul 2023 17:17:07 +0000 (17:17 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 2 Jul 2023 19:19:30 +0000 (19:19 +0000)
commitf739c3112576469fe79f77c9777936608b1cfebc
tree7dba7f797721899cc10a7154db7e070e45d73548
parent60ad4958a2144b229ed09359afbb3711c192053b
Build reminder updates with correct SCID field

When the reminder updates were added, a dummy `ChannelUpdate` with
a number of zero'd fields were created under the assumption that
the zero'd fields would be ignored downstream when building
serialized updates. However, the SCID field was `assert`'ed on (and
serialized in the update), causing any reminder updates to cause an
assertion panic.

Instead, we do it the Right Way (tm) here and move the
only-sometimes-available fields into the update type enum, ensuring
we can't access "poison" fields downstream.
src/lib.rs
src/serialization.rs