@@ -28,6 +28,9 @@ const DEFAULT_LDK_WALLET_SYNC_INTERVAL_SECS: u64 = 30;
2828const DEFAULT_FEE_RATE_CACHE_UPDATE_INTERVAL_SECS : u64 = 60 * 10 ;
2929const DEFAULT_PROBING_LIQUIDITY_LIMIT_MULTIPLIER : u64 = 3 ;
3030const DEFAULT_ANCHOR_PER_CHANNEL_RESERVE_SATS : u64 = 25_000 ;
31+ // Alby: our project is well-tested and requires larger inbound channels,
32+ // especially for business users.
33+ const DEFAULT_MAX_INBOUND_CHANNEL_SIZE_SATS : u64 = 10 * 100_000_000 ;
3134
3235/// The default log level.
3336pub const DEFAULT_LOG_LEVEL : LogLevel = LogLevel :: Debug ;
@@ -329,6 +332,10 @@ pub(crate) fn default_user_config(config: &Config) -> UserConfig {
329332 // some of the values set here, e.g. the ChannelHandshakeConfig, meaning these default values
330333 // will mostly be relevant for inbound channels.
331334 let mut user_config = UserConfig :: default ( ) ;
335+ // Alby: override LDK's default inbound channel limit to allow larger
336+ // channels needed by well-tested deployments and business users.
337+ user_config. channel_handshake_limits . max_funding_satoshis =
338+ DEFAULT_MAX_INBOUND_CHANNEL_SIZE_SATS ;
332339 user_config. channel_handshake_limits . force_announced_channel_preference = false ;
333340 user_config. manually_accept_inbound_channels = true ;
334341 user_config. channel_handshake_config . negotiate_anchors_zero_fee_htlc_tx =
@@ -565,7 +572,21 @@ pub enum AsyncPaymentsRole {
565572mod tests {
566573 use std:: str:: FromStr ;
567574
568- use super :: { may_announce_channel, AnnounceError , Config , NodeAlias , SocketAddress } ;
575+ use super :: {
576+ default_user_config, may_announce_channel, AnnounceError , Config , NodeAlias , SocketAddress ,
577+ DEFAULT_MAX_INBOUND_CHANNEL_SIZE_SATS ,
578+ } ;
579+
580+ #[ test]
581+ fn default_user_config_allows_10_btc_inbound_channels ( ) {
582+ let node_config = Config :: default ( ) ;
583+ let user_config = default_user_config ( & node_config) ;
584+
585+ assert_eq ! (
586+ user_config. channel_handshake_limits. max_funding_satoshis,
587+ DEFAULT_MAX_INBOUND_CHANNEL_SIZE_SATS
588+ ) ;
589+ }
569590
570591 #[ test]
571592 fn node_announce_channel ( ) {
0 commit comments