X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fconfig.rs;h=55d506e79f145a386919ecce11f54ea7adbb432f;hb=e43cfe135a5b68620cd51b9b982362c272b4ef77;hp=c591cacb3463fd6e216a24da8390bdce6ddde1f9;hpb=e7b2bca1d6b58ff9e2ccc3c0ca7d3c9afadb67e2;p=rust-lightning diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index c591cacb..55d506e7 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -305,6 +305,20 @@ pub struct UserConfig { /// If this is set to false, we do not accept inbound requests to open a new channel. /// Default value: true. pub accept_inbound_channels: bool, + /// If this is set to true, the user needs to manually accept inbound requests to open a new + /// channel. + /// + /// When set to true, [`Event::OpenChannelRequest`] will be triggered once a request to open a + /// new inbound channel is received through a [`msgs::OpenChannel`] message. In that case, a + /// [`msgs::AcceptChannel`] message will not be sent back to the counterparty node unless the + /// user explicitly chooses to accept the request. + /// + /// Default value: false. + /// + /// [`Event::OpenChannelRequest`]: crate::util::events::Event::OpenChannelRequest + /// [`msgs::OpenChannel`]: crate::ln::msgs::OpenChannel + /// [`msgs::AcceptChannel`]: crate::ln::msgs::AcceptChannel + pub manually_accept_inbound_channels: bool, } impl Default for UserConfig { @@ -315,6 +329,7 @@ impl Default for UserConfig { channel_options: ChannelConfig::default(), accept_forwards_to_priv_channels: false, accept_inbound_channels: true, + manually_accept_inbound_channels: false, } } }