From 6fe8c121a782f2ec9477ffb4d96ba82e6009f36e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 16 Mar 2020 19:01:17 -0400 Subject: [PATCH] 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. --- lightning/src/ln/channelmonitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)?; }, -- 2.39.5