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
Copy file name to clipboardExpand all lines: lightning/src/ln/channel.rs
+42-35Lines changed: 42 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -732,8 +732,8 @@ struct CommitmentStats<'a> {
732
732
total_fee_sat: u64, // the total fee included in the transaction
733
733
num_nondust_htlcs: usize, // the number of HTLC outputs (dust HTLCs *non*-included)
734
734
htlcs_included: Vec<(HTLCOutputInCommitment, Option<&'a HTLCSource>)>, // the list of HTLCs (dust HTLCs *included*) which were not ignored when building the transaction
735
-
local_balance_msat: u64, // local balance before fees but considering dust limits
736
-
remote_balance_msat: u64, // remote balance before fees but considering dust limits
735
+
local_balance_msat: u64, // local balance before fees *not* considering dust limits
let mut value_to_self_msat: i64 = (self.value_to_self_msat - local_htlc_total_msat) as i64 + value_to_self_msat_offset;
1731
+
let value_to_self_msat: i64 = (self.value_to_self_msat - local_htlc_total_msat) as i64 + value_to_self_msat_offset;
1732
1732
assert!(value_to_self_msat >= 0);
1733
1733
// Note that in case they have several just-awaiting-last-RAA fulfills in-progress (ie
1734
1734
// AwaitingRemoteRevokeToRemove or AwaitingRemovedRemoteRevoke) we may have allowed them to
1735
1735
// "violate" their reserve value by couting those against it. Thus, we have to convert
1736
1736
// everything to i64 before subtracting as otherwise we can overflow.
1737
-
let mut value_to_remote_msat: i64 = (self.channel_value_satoshis * 1000) as i64 - (self.value_to_self_msat as i64) - (remote_htlc_total_msat as i64) - value_to_self_msat_offset;
1737
+
let value_to_remote_msat: i64 = (self.channel_value_satoshis * 1000) as i64 - (self.value_to_self_msat as i64) - (remote_htlc_total_msat as i64) - value_to_self_msat_offset;
0 commit comments