From: Matt Corallo Date: Mon, 16 Mar 2020 23:01:17 +0000 (-0400) Subject: Fix ChannelMonitor round-trip introduced by 3d640da5c343111f538f006 X-Git-Tag: v0.0.12~103^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=6fe8c121a782f2ec9477ffb4d96ba82e6009f36e;p=rust-lightning Fix ChannelMonitor round-trip introduced by 3d640da5c343111f538f006 3d640da5c343111f538f006996c13c9a98e0d9e6 changed the indexes for some enums in ChannelMonitor deserialization but not serialization. Thus, the chanmon_deser_target fuzz target failed on travis on at least one PR. --- diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 205f4b011..c14524572 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -1024,7 +1024,7 @@ impl ChannelMonitor { for ev in events.iter() { match *ev { OnchainEvent::HTLCUpdate { ref htlc_update } => { - writer.write_all(&[1; 1])?; + 0u8.write(writer)?; htlc_update.0.write(writer)?; htlc_update.1.write(writer)?; },