return Err(MsgHandleErrInternal::send_err_msg_no_close("Unknown genesis block hash".to_owned(), msg.temporary_channel_id.clone()));
}
+ if !self.default_configuration.accept_inbound_channels {
+ return Err(MsgHandleErrInternal::send_err_msg_no_close("No inbound channels accepted".to_owned(), msg.temporary_channel_id.clone()));
+ }
+
let channel = Channel::new_from_req(&self.fee_estimator, &self.keys_manager, counterparty_node_id.clone(),
&their_features, msg, 0, &self.default_configuration, self.best_block.read().unwrap().height())
.map_err(|e| MsgHandleErrInternal::from_chan_no_close(e, msg.temporary_channel_id))?;
///
/// 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 {
peer_channel_config_limits: ChannelHandshakeLimits::default(),
channel_options: ChannelConfig::default(),
accept_forwards_to_priv_channels: false,
+ accept_inbound_channels: true,
}
}
}