You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let holder_signer = keys_provider.get_channel_signer(false, channel_value_satoshis);
855
855
let pubkeys = holder_signer.pubkeys().clone();
856
856
857
-
if channel_value_satoshis >= MAX_FUNDING_SATOSHIS_NO_WUMBO{
858
-
returnErr(APIError::APIMisuseError{err:format!("funding_value must be smaller than {}, it was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO, channel_value_satoshis)});
857
+
if !their_features.supports_wumbo() && channel_value_satoshis >= MAX_FUNDING_SATOSHIS_NO_WUMBO{
858
+
returnErr(APIError::APIMisuseError{err:format!("funding_value must be smaller than {}, it was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO, channel_value_satoshis)});
859
+
}
860
+
if channel_value_satoshis >= TOTAL_BITCOIN_SUPPLY_SATOSHIS{
861
+
returnErr(APIError::APIMisuseError{err:format!("funding_value must be smaller than the total bitcoin supply, it was {}", channel_value_satoshis)});
859
862
}
860
863
let channel_value_msat = channel_value_satoshis *1000;
returnErr(ChannelError::Close(format!("Funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO, msg.funding_satoshis)));
1085
1088
}
1089
+
if msg.funding_satoshis >= config.peer_channel_config_limits.max_funding_satoshis{
1090
+
returnErr(ChannelError::Close(format!("Per our config, funding must be smaller than {}. It was {}", config.peer_channel_config_limits.max_funding_satoshis, msg.funding_satoshis)));
1091
+
}
1092
+
if msg.funding_satoshis > TOTAL_BITCOIN_SUPPLY_SATOSHIS{
1093
+
returnErr(ChannelError::Close(format!("Funding must be smaller than the total bitcoin supply. It was {}", msg.funding_satoshis)));
1094
+
}
1086
1095
if msg.channel_reserve_satoshis > msg.funding_satoshis{
1087
1096
returnErr(ChannelError::Close(format!("Bogus channel_reserve_satoshis ({}). Must be not greater than funding_satoshis: {}", msg.channel_reserve_satoshis, msg.funding_satoshis)));
use ln::channelmanager::MAX_LOCAL_BREAKDOWN_TIMEOUT;
98
98
99
99
// Test all mutations that would make the channel open message insane
100
-
insane_open_helper(format!("Funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO,MAX_FUNDING_SATOSHIS_NO_WUMBO).as_str(), |mut msg| { msg.funding_satoshis = MAX_FUNDING_SATOSHIS_NO_WUMBO; msg }, |f| f);
100
+
insane_open_helper(
101
+
format!("Funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO,MAX_FUNDING_SATOSHIS_NO_WUMBO).as_str(),
insane_open_helper(format!("Per our config, funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO,MAX_FUNDING_SATOSHIS_NO_WUMBO).as_str(), |mut msg| { msg.funding_satoshis = MAX_FUNDING_SATOSHIS_NO_WUMBO; msg }, |f| f);
0 commit comments