Skip to content

Commit efc0861

Browse files
committed
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.
1 parent d5fb999 commit efc0861

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/util/events.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ impl Writeable for Event {
11251125
BumpTransactionEvent::ChannelClose { .. } => {}
11261126
BumpTransactionEvent::HTLCResolution { .. } => {}
11271127
}
1128+
write_tlv_fields!(writer, {}); // Write a length field for forwards compat
11281129
}
11291130
&Event::ChannelReady { ref channel_id, ref user_channel_id, ref counterparty_node_id, ref channel_type } => {
11301131
29u8.write(writer)?;

0 commit comments

Comments
 (0)