X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fevents%2Fmod.rs;h=269887a3dbac06fc1ba24dcda084f5c2c2115de2;hb=7d5f137946e637eed542f3f60a1c30cbbc08a643;hp=bb98e271597309d057ca4712b394e302b35cddc3;hpb=448b191fec4c6d1e9638c82aade7385b1516aa5d;p=rust-lightning diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs index bb98e271..269887a3 100644 --- a/lightning/src/events/mod.rs +++ b/lightning/src/events/mod.rs @@ -199,6 +199,9 @@ pub enum ClosureReason { /// The counterparty requested a cooperative close of a channel that had not been funded yet. /// The channel has been immediately closed. CounterpartyCoopClosedUnfundedChannel, + /// Another channel in the same funding batch closed before the funding transaction + /// was ready to be broadcast. + FundingBatchClosure, } impl core::fmt::Display for ClosureReason { @@ -219,6 +222,7 @@ impl core::fmt::Display for ClosureReason { ClosureReason::DisconnectedPeer => f.write_str("the peer disconnected prior to the channel being funded"), ClosureReason::OutdatedChannelManager => f.write_str("the ChannelManager read from disk was stale compared to ChannelMonitor(s)"), ClosureReason::CounterpartyCoopClosedUnfundedChannel => f.write_str("the peer requested the unfunded channel be closed"), + ClosureReason::FundingBatchClosure => f.write_str("another channel in the same funding batch closed"), } } } @@ -233,6 +237,7 @@ impl_writeable_tlv_based_enum_upgradable!(ClosureReason, (10, DisconnectedPeer) => {}, (12, OutdatedChannelManager) => {}, (13, CounterpartyCoopClosedUnfundedChannel) => {}, + (15, FundingBatchClosure) => {} ); /// Intended destination of a failed HTLC as indicated in [`Event::HTLCHandlingFailed`]. @@ -844,6 +849,8 @@ pub enum Event { }, /// Used to indicate to the user that they can abandon the funding transaction and recycle the /// inputs for another purpose. + /// + /// This event is not guaranteed to be generated for channels that are closed due to a restart. DiscardFunding { /// The channel_id of the channel which has been closed. channel_id: ChannelId,