Skip to content

Commit 98fb236

Browse files
committed
Correct ChannelManager in_flight_monitor_updates serialization
In e8854f9 we changed the type of `ChannelManager::in_flight_monitor_updates`, writing a legacy version and reading the new version as a new TLV field. Sadly, we spuriously marked the new TLV as `required`, breaking upgrade from 0.1. Here we fix the oversight by simply marking it `option`al.
1 parent df68774 commit 98fb236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13389,7 +13389,7 @@ where
1338913389
(13, htlc_onion_fields, optional_vec),
1339013390
(14, decode_update_add_htlcs_opt, option),
1339113391
(15, self.inbound_payment_id_secret, required),
13392-
(17, in_flight_monitor_updates, required),
13392+
(17, in_flight_monitor_updates, option),
1339313393
(19, peer_storage_dir, optional_vec),
1339413394
});
1339513395

@@ -13935,7 +13935,7 @@ where
1393513935
(13, claimable_htlc_onion_fields, optional_vec),
1393613936
(14, decode_update_add_htlcs, option),
1393713937
(15, inbound_payment_id_secret, option),
13938-
(17, in_flight_monitor_updates, required),
13938+
(17, in_flight_monitor_updates, option),
1393913939
(19, peer_storage_dir, optional_vec),
1394013940
});
1394113941
let mut decode_update_add_htlcs = decode_update_add_htlcs.unwrap_or_else(|| new_hash_map());

0 commit comments

Comments
 (0)