From: Matt Corallo Date: Wed, 7 Dec 2022 00:41:07 +0000 (+0000) Subject: Ensure `Event::BumpTransaction` is forwards-compatible X-Git-Tag: v0.0.113~7^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a1f7cbb572fa50dcb933bb162facb5ce2cd82576;p=rust-lightning Ensure `Event::BumpTransaction` is forwards-compatible `Event`s with an odd type are ignored by older versions of LDK, however they rely on the `write_tlv_fields` call to know how many bytes to read and discard. We were missing that call in our writing of `Event::BumpTransaction`, which we add here. --- diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 2c7e5413d..375174f6f 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -1125,6 +1125,7 @@ impl Writeable for Event { BumpTransactionEvent::ChannelClose { .. } => {} BumpTransactionEvent::HTLCResolution { .. } => {} } + write_tlv_fields!(writer, {}); // Write a length field for forwards compat } &Event::ChannelReady { ref channel_id, ref user_channel_id, ref counterparty_node_id, ref channel_type } => { 29u8.write(writer)?;