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
if msg.channel_reserve_satoshis > msg.funding_satoshis{
1104
1104
returnErr(ChannelError::Close(format!("Bogus channel_reserve_satoshis ({}). Must be not greater than funding_satoshis: {}", msg.channel_reserve_satoshis, msg.funding_satoshis)));
returnErr(ChannelError::Close(format!("push_msat {} was larger than channel amount minus reserve ({})", msg.push_msat,full_channel_value_msat)));
1109
1109
}
1110
1110
if msg.dust_limit_satoshis > msg.funding_satoshis{
1111
1111
returnErr(ChannelError::Close(format!("dust_limit_satoshis {} was larger than funding_satoshis {}. Peer never wants payout outputs?", msg.dust_limit_satoshis, msg.funding_satoshis)));
1112
1112
}
1113
-
let full_channel_value_msat = (msg.funding_satoshis - msg.channel_reserve_satoshis)*1000;
1114
1113
if msg.htlc_minimum_msat >= full_channel_value_msat {
1115
1114
returnErr(ChannelError::Close(format!("Minimum htlc value ({}) was larger than full channel value ({})", msg.htlc_minimum_msat, full_channel_value_msat)));
if holder_selected_channel_reserve_satoshis < MIN_CHAN_DUST_LIMIT_SATOSHIS{
1165
1164
returnErr(ChannelError::Close(format!("Suitable channel reserve not found. remote_channel_reserve was ({}). dust_limit_satoshis is ({}).", holder_selected_channel_reserve_satoshis,MIN_CHAN_DUST_LIMIT_SATOSHIS)));
1166
1165
}
1166
+
if holder_selected_channel_reserve_satoshis *1000 >= full_channel_value_msat {
1167
+
returnErr(ChannelError::Close(format!("Suitable channel reserve not found. remote_channel_reserve was ({}). Channel value is ({} - {}).", holder_selected_channel_reserve_satoshis, full_channel_value_msat, msg.push_msat)));
1168
+
}
1167
1169
if msg.channel_reserve_satoshis < MIN_CHAN_DUST_LIMIT_SATOSHIS{
1168
1170
log_debug!(logger,"channel_reserve_satoshis ({}) is smaller than our dust limit ({}). We can broadcast stale states without any risk, implying this channel is very insecure for our counterparty.",
0 commit comments