@@ -538,6 +538,17 @@ impl_writeable_tlv_based_enum!(PaymentFailureReason,
538
538
( 10 , UnexpectedError ) => { } , ;
539
539
) ;
540
540
541
+ /// Used to indicate the kind of funding for this channel by the channel acceptor (us).
542
+ ///
543
+ /// Allows the differentiation between a request for a dual-funded and non-dual-funded channel.
544
+ #[ derive( Clone , Debug , PartialEq , Eq ) ]
545
+ pub enum InboundChannelFunds {
546
+ /// For a non-dual-funded channel, the `push_msat` value from the channel initiator to us.
547
+ PushMsat ( u64 ) ,
548
+ /// Indicates the open request is for a dual funded channel.
549
+ DualFunded ,
550
+ }
551
+
541
552
/// An Event which you should probably take some action in response to.
542
553
///
543
554
/// Note that while Writeable and Readable are implemented for Event, you probably shouldn't use
@@ -1143,9 +1154,14 @@ pub enum Event {
1143
1154
} ,
1144
1155
/// Indicates a request to open a new channel by a peer.
1145
1156
///
1146
- /// To accept the request, call [`ChannelManager::accept_inbound_channel`]. To reject the request,
1147
- /// call [`ChannelManager::force_close_without_broadcasting_txn`]. Note that a ['ChannelClosed`]
1148
- /// event will _not_ be triggered if the channel is rejected.
1157
+ /// If `acceptor_funds` is `InboundChannelFunds::DualFunded`, this indicates that the peer wishes to
1158
+ /// open a dual-funded channel. Otherwise, `acceptor_funds` will be `InboundChannelFunds::PushMsats`,
1159
+ /// indicating the `push_msats` value for a non-dual-funded channel.
1160
+ ///
1161
+ /// To accept the request (and in the case of a dual-funded channel, not contribute funds),
1162
+ /// call [`ChannelManager::accept_inbound_channel`].
1163
+ /// To reject the request, call [`ChannelManager::force_close_without_broadcasting_txn`].
1164
+ /// Note that a ['ChannelClosed`] event will _not_ be triggered if the channel is rejected.
1149
1165
///
1150
1166
/// The event is only triggered when a new open channel request is received and the
1151
1167
/// [`UserConfig::manually_accept_inbound_channels`] config flag is set to true.
@@ -1176,7 +1192,7 @@ pub enum Event {
1176
1192
/// The channel value of the requested channel.
1177
1193
funding_satoshis : u64 ,
1178
1194
/// Our starting balance in the channel if the request is accepted, in milli-satoshi.
1179
- push_msat : u64 ,
1195
+ acceptor_funds : InboundChannelFunds ,
1180
1196
/// The features that this channel will operate with. If you reject the channel, a
1181
1197
/// well-behaved counterparty may automatically re-attempt the channel with a new set of
1182
1198
/// feature flags.
0 commit comments