Skip to content

Commit 46913da

Browse files
committed
Fix backwards compat for blocked_monitor_updates
In 1ce2beb, `Channel::blocked_monitor_updates` was moved to an even TLV to ensure downgrades with vec entries are forbidden. However, the serialized type remained `vec_type`, which is always written. Instead, `optional_vec` must be used.
1 parent e40b6ae commit 46913da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6781,7 +6781,7 @@ impl<Signer: WriteableEcdsaChannelSigner> Writeable for Channel<Signer> {
67816781
(5, self.context.config, required),
67826782
(6, serialized_holder_htlc_max_in_flight, option),
67836783
(7, self.context.shutdown_scriptpubkey, option),
6784-
(8, self.context.blocked_monitor_updates, vec_type),
6784+
(8, self.context.blocked_monitor_updates, optional_vec),
67856785
(9, self.context.target_closing_feerate_sats_per_kw, option),
67866786
(11, self.context.monitor_pending_finalized_fulfills, vec_type),
67876787
(13, self.context.channel_creation_height, required),
@@ -7089,7 +7089,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
70897089
(5, config, option), // Note that if none is provided we will *not* overwrite the existing one.
70907090
(6, holder_max_htlc_value_in_flight_msat, option),
70917091
(7, shutdown_scriptpubkey, option),
7092-
(8, blocked_monitor_updates, vec_type),
7092+
(8, blocked_monitor_updates, optional_vec),
70937093
(9, target_closing_feerate_sats_per_kw, option),
70947094
(11, monitor_pending_finalized_fulfills, vec_type),
70957095
(13, channel_creation_height, option),

0 commit comments

Comments
 (0)