+ #[cfg(any(test, feature = "fuzztarget"))]
+ (self.historical_inbound_htlc_fulfills.len() as u64).write(writer)?;
+ #[cfg(any(test, feature = "fuzztarget"))]
+ for htlc in self.historical_inbound_htlc_fulfills.iter() {
+ htlc.write(writer)?;
+ }
+
+ write_tlv_fields!(writer, {
+ (0, self.announcement_sigs, option),
+ // minimum_depth and counterparty_selected_channel_reserve_satoshis used to have a
+ // default value instead of being Option<>al. Thus, to maintain compatibility we write
+ // them twice, once with their original default values above, and once as an option
+ // here. On the read side, old versions will simply ignore the odd-type entries here,
+ // and new versions map the default values to None and allow the TLV entries here to
+ // override that.
+ (1, self.minimum_depth, option),
+ (3, self.counterparty_selected_channel_reserve_satoshis, option),
+ (5, self.config, required),
+ (7, self.shutdown_scriptpubkey, option),
+ });