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 next_remote_commitment_stats.inbound_htlcs_count > self.holder_max_accepted_htlcs as usize {
4363
-
return Err(ChannelError::close(format!("Remote tried to push more than our max accepted HTLCs ({})", self.holder_max_accepted_htlcs)));
4370
+
if next_remote_commitment_stats.inbound_htlcs_count
4371
+
> self.holder_max_accepted_htlcs as usize
4372
+
{
4373
+
return Err(ChannelError::close(format!(
4374
+
"Remote tried to push more than our max accepted HTLCs ({})",
4375
+
self.holder_max_accepted_htlcs,
4376
+
)));
4364
4377
}
4365
-
if next_remote_commitment_stats.inbound_htlcs_value_msat > self.holder_max_htlc_value_in_flight_msat {
4366
-
return Err(ChannelError::close(format!("Remote HTLC add would put them over our max HTLC value ({})", self.holder_max_htlc_value_in_flight_msat)));
4378
+
if next_remote_commitment_stats.inbound_htlcs_value_msat
4379
+
> self.holder_max_htlc_value_in_flight_msat
4380
+
{
4381
+
return Err(ChannelError::close(format!(
4382
+
"Remote HTLC add would put them over our max HTLC value ({})",
4383
+
self.holder_max_htlc_value_in_flight_msat,
4384
+
)));
4367
4385
}
4368
4386
4369
-
let remote_balance_before_fee_msat = next_remote_commitment_stats.counterparty_balance_before_fee_msat.ok_or(ChannelError::close("Remote HTLC add would overdraw remaining funds".to_owned()))?;
let holder_balance_msat = next_local_commitment_stats.holder_balance_before_fee_msat.expect("Adding an inbound HTLC should never exhaust the holder's balance before fees");
4428
+
let next_local_commitment_stats = self.get_next_local_commitment_stats(
0 commit comments