@@ -318,9 +318,11 @@ pub enum ClosureReason {
318
318
/// [`UntrustedString`]: crate::util::string::UntrustedString
319
319
peer_msg : UntrustedString ,
320
320
} ,
321
- /// Closure generated from [`ChannelManager::force_close_channel`], called by the user.
321
+ /// Closure generated from [`ChannelManager::force_close_broadcasting_latest_txn`] or
322
+ /// [`ChannelManager::force_close_all_channels_broadcasting_latest_txn`], called by the user.
322
323
///
323
- /// [`ChannelManager::force_close_channel`]: crate::ln::channelmanager::ChannelManager::force_close_channel.
324
+ /// [`ChannelManager::force_close_broadcasting_latest_txn`]: crate::ln::channelmanager::ChannelManager::force_close_broadcasting_latest_txn
325
+ /// [`ChannelManager::force_close_all_channels_broadcasting_latest_txn`]: crate::ln::channelmanager::ChannelManager::force_close_all_channels_broadcasting_latest_txn
324
326
HolderForceClosed {
325
327
/// Whether or not the latest transaction was broadcasted when the channel was force
326
328
/// closed.
@@ -335,7 +337,13 @@ pub enum ClosureReason {
335
337
/// [`ChannelManager::force_close_broadcasting_latest_txn`]: crate::ln::channelmanager::ChannelManager::force_close_broadcasting_latest_txn.
336
338
/// [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn.
337
339
broadcasted_latest_txn : Option < bool > ,
338
- /// XXX: What was passed to force_close!
340
+ /// The error message provided to [`ChannelManager::force_close_broadcasting_latest_txn`] or
341
+ /// [`ChannelManager::force_close_all_channels_broadcasting_latest_txn`].
342
+ ///
343
+ /// This will be the empty string for objects generated or written by LDK 0.1 and earlier.
344
+ ///
345
+ /// [`ChannelManager::force_close_broadcasting_latest_txn`]: crate::ln::channelmanager::ChannelManager::force_close_broadcasting_latest_txn
346
+ /// [`ChannelManager::force_close_all_channels_broadcasting_latest_txn`]: crate::ln::channelmanager::ChannelManager::force_close_all_channels_broadcasting_latest_txn
339
347
message : String ,
340
348
} ,
341
349
/// The channel was closed after negotiating a cooperative close and we've now broadcasted
@@ -487,7 +495,7 @@ impl_writeable_tlv_based_enum_upgradable!(ClosureReason,
487
495
( 1 , FundingTimedOut ) => { } ,
488
496
( 2 , HolderForceClosed ) => {
489
497
( 1 , broadcasted_latest_txn, option) ,
490
- ( 3 , message, required ) , // XXX: upgrade to empty string or whatever and document
498
+ ( 3 , message, ( default_value , String :: new ( ) ) ) ,
491
499
} ,
492
500
( 6 , CommitmentTxConfirmed ) => { } ,
493
501
( 4 , LegacyCooperativeClosure ) => { } ,
0 commit comments