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
+6-12Lines changed: 6 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -879,9 +879,7 @@ struct HTLCStats {
879
879
/// An enum gathering stats on commitment transaction, either local or remote.
880
880
struct CommitmentStats<'a> {
881
881
tx: CommitmentTransaction, // the transaction info
882
-
feerate_per_kw: u32, // the feerate included to build the transaction
883
882
total_fee_sat: u64, // the total fee included in the transaction
884
-
num_nondust_htlcs: usize, // the number of HTLC outputs (dust HTLCs *non*-included)
885
883
htlcs_included: Vec<(HTLCOutputInCommitment, Option<&'a HTLCSource>)>, // the list of HTLCs (dust HTLCs *included*) which were not ignored when building the transaction
886
884
local_balance_msat: u64, // local balance before fees *not* considering dust limits
if msg.htlc_signatures.len() != commitment_stats.num_nondust_htlcs {
3508
-
return Err(ChannelError::close(format!("Got wrong number of HTLC signatures ({}) from remote. It must be {}", msg.htlc_signatures.len(), commitment_stats.num_nondust_htlcs)));
3505
+
if msg.htlc_signatures.len() != commitment_stats.tx.htlcs().len() {
3506
+
return Err(ChannelError::close(format!("Got wrong number of HTLC signatures ({}) from remote. It must be {}", msg.htlc_signatures.len(), commitment_stats.tx.htlcs().len())));
3509
3507
}
3510
3508
3511
3509
// Up to LDK 0.0.115, HTLC information was required to be duplicated in the
0 commit comments