X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fconfig.rs;h=55d506e79f145a386919ecce11f54ea7adbb432f;hb=0df247d6328ea78a6c1daa3d01f5c311e82f06a6;hp=fb4f6fce737fb1eb47c8cb95abcc8ae69d5ef3b4;hpb=a265f1e97a9eff25b3418daf4b12fc9c6ad4c036;p=rust-lightning diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index fb4f6fce..55d506e7 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -302,6 +302,23 @@ pub struct UserConfig { /// /// Default value: false. pub accept_forwards_to_priv_channels: bool, + /// 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 { @@ -311,6 +328,8 @@ impl Default for UserConfig { peer_channel_config_limits: ChannelHandshakeLimits::default(), channel_options: ChannelConfig::default(), accept_forwards_to_priv_channels: false, + accept_inbound_channels: true, + manually_accept_inbound_channels: false, } } }