@@ -199,6 +199,9 @@ pub enum ClosureReason {
199
199
/// The counterparty requested a cooperative close of a channel that had not been funded yet.
200
200
/// The channel has been immediately closed.
201
201
CounterpartyCoopClosedUnfundedChannel ,
202
+ /// Another channel in the same funding batch closed before the funding transaction
203
+ /// was ready to be broadcast.
204
+ FundingBatchClosure ,
202
205
}
203
206
204
207
impl core:: fmt:: Display for ClosureReason {
@@ -219,6 +222,7 @@ impl core::fmt::Display for ClosureReason {
219
222
ClosureReason :: DisconnectedPeer => f. write_str ( "the peer disconnected prior to the channel being funded" ) ,
220
223
ClosureReason :: OutdatedChannelManager => f. write_str ( "the ChannelManager read from disk was stale compared to ChannelMonitor(s)" ) ,
221
224
ClosureReason :: CounterpartyCoopClosedUnfundedChannel => f. write_str ( "the peer requested the unfunded channel be closed" ) ,
225
+ ClosureReason :: FundingBatchClosure => f. write_str ( "another channel in the same funding batch closed" ) ,
222
226
}
223
227
}
224
228
}
@@ -233,6 +237,7 @@ impl_writeable_tlv_based_enum_upgradable!(ClosureReason,
233
237
( 10 , DisconnectedPeer ) => { } ,
234
238
( 12 , OutdatedChannelManager ) => { } ,
235
239
( 13 , CounterpartyCoopClosedUnfundedChannel ) => { } ,
240
+ ( 15 , FundingBatchClosure ) => { }
236
241
) ;
237
242
238
243
/// Intended destination of a failed HTLC as indicated in [`Event::HTLCHandlingFailed`].
@@ -844,6 +849,8 @@ pub enum Event {
844
849
} ,
845
850
/// Used to indicate to the user that they can abandon the funding transaction and recycle the
846
851
/// inputs for another purpose.
852
+ ///
853
+ /// This event is not guaranteed to be generated for channels that are closed due to a restart.
847
854
DiscardFunding {
848
855
/// The channel_id of the channel which has been closed.
849
856
channel_id : ChannelId ,
0 commit comments