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
MAX_FUNDING_SATOSHIS will no longer be accurately named once wumbo is merged.
Also, we'll want to check that wumbo channels don't exceed the total bitcoin supply
let holder_signer = keys_provider.get_channel_signer(false, channel_value_satoshis);
851
855
let pubkeys = holder_signer.pubkeys().clone();
852
856
853
-
if channel_value_satoshis >= MAX_FUNDING_SATOSHIS{
854
-
returnErr(APIError::APIMisuseError{err:format!("funding_value must be smaller than {}, it was {}",MAX_FUNDING_SATOSHIS, channel_value_satoshis)});
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)});
855
859
}
856
860
let channel_value_msat = channel_value_satoshis *1000;
returnErr(ChannelError::Close(format!("Funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS, msg.funding_satoshis)));
1083
+
if msg.funding_satoshis >= MAX_FUNDING_SATOSHIS_NO_WUMBO{
1084
+
returnErr(ChannelError::Close(format!("Funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS_NO_WUMBO, msg.funding_satoshis)));
1081
1085
}
1082
1086
if msg.channel_reserve_satoshis > msg.funding_satoshis{
1083
1087
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;
97
97
98
98
// Test all mutations that would make the channel open message insane
99
-
insane_open_helper(format!("Funding must be smaller than {}. It was {}",MAX_FUNDING_SATOSHIS,MAX_FUNDING_SATOSHIS).as_str(), |mut msg| { msg.funding_satoshis = MAX_FUNDING_SATOSHIS; msg });
99
+
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 });
0 commit comments