Add 'accept_inbound_channels' config option.
[rust-lightning] / lightning / src / util / config.rs
index fb4f6fce737fb1eb47c8cb95abcc8ae69d5ef3b4..c591cacb3463fd6e216a24da8390bdce6ddde1f9 100644 (file)
@@ -302,6 +302,9 @@ 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,
 }
 
 impl Default for UserConfig {
@@ -311,6 +314,7 @@ impl Default for UserConfig {
                        peer_channel_config_limits: ChannelHandshakeLimits::default(),
                        channel_options: ChannelConfig::default(),
                        accept_forwards_to_priv_channels: false,
+                       accept_inbound_channels: true,
                }
        }
 }