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/chain/package.rs
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1704,7 +1704,7 @@ mod tests {
1704
1704
let dumb_scalar = SecretKey::from_slice(&<Vec<u8>>::from_hex("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap();
1705
1705
let dumb_point = PublicKey::from_secret_key(&secp_ctx,&dumb_scalar);
1706
1706
let hash = PaymentHash([1;32]);
1707
-
let htlc = HTLCOutputInCommitment{ offered:false, amount_msat:1_000_000, cltv_expiry:0, payment_hash: hash, transaction_output_index:None};
let dumb_scalar = SecretKey::from_slice(&<Vec<u8>>::from_hex("0101010101010101010101010101010101010101010101010101010101010101").unwrap()[..]).unwrap();
1724
1724
let dumb_point = PublicKey::from_secret_key(&secp_ctx,&dumb_scalar);
let htlc_in_tx = get_htlc_in_commitment!($htlc, $outbound == local, $is_dust);
4599
4600
htlcs_included.push((htlc_in_tx, $source));
4600
4601
}
4601
4602
}
@@ -4606,7 +4607,8 @@ where
4606
4607
for htlc in self.pending_inbound_htlcs.iter() {
4607
4608
if htlc.state.included_in_commitment(generated_by_local) {
4608
4609
log_trace!(logger, " ...including inbound {} HTLC {} (hash {}) with value {}", htlc.state, htlc.htlc_id, htlc.payment_hash, htlc.amount_msat);
4609
-
add_htlc_output!(htlc, false, None);
4610
+
let is_dust = htlc.is_dust(local, feerate_per_kw, broadcaster_dust_limit_sat, funding.get_channel_type());
4611
+
add_htlc_output!(htlc, false, None, is_dust);
4610
4612
} else {
4611
4613
log_trace!(logger, " ...not including inbound HTLC {} (hash {}) with value {} due to state ({})", htlc.htlc_id, htlc.payment_hash, htlc.amount_msat, htlc.state);
4612
4614
if let Some(preimage) = htlc.state.preimage() {
@@ -4622,7 +4624,8 @@ where
4622
4624
}
4623
4625
if htlc.state.included_in_commitment(generated_by_local) {
4624
4626
log_trace!(logger, " ...including outbound {} HTLC {} (hash {}) with value {}", htlc.state, htlc.htlc_id, htlc.payment_hash, htlc.amount_msat);
4625
-
add_htlc_output!(htlc, true, Some(&htlc.source));
4627
+
let is_dust = htlc.is_dust(local, feerate_per_kw, broadcaster_dust_limit_sat, funding.get_channel_type());
log_trace!(logger, " ...not including outbound HTLC {} (hash {}) with value {} due to state ({})", htlc.htlc_id, htlc.payment_hash, htlc.amount_msat, htlc.state);
0 commit comments