From a1f7cbb572fa50dcb933bb162facb5ce2cd82576 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 7 Dec 2022 00:41:07 +0000 Subject: [PATCH] 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. --- lightning/src/util/events.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 2c7e5413..375174f6 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)?; -- 2.30.2