Skip to content

Commit 7422b18

Browse files
committed
Minor comments added, review
1 parent 232f793 commit 7422b18

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,6 +2316,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
23162316
let change_output_weight = get_output_weight(&change_output.script_pubkey).to_wu();
23172317
let change_output_fee = fee_for_weight(self.dual_funding_context.funding_feerate_sat_per_1000_weight, change_output_weight);
23182318
change_output.value = Amount::from_sat(change_value.saturating_sub(change_output_fee));
2319+
// Note: dust check not done here, should be handled before
23192320
funding_outputs.push(OutputOwned::Single(change_output));
23202321
}
23212322

lightning/src/ln/interactivetxs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,7 @@ pub(super) fn calculate_change_output_value(
16961696
let total_input_satoshis: u64 =
16971697
funding_inputs_prev_outputs.iter().map(|out| out.value.to_sat()).sum();
16981698

1699+
// Note: in case of additional outputs, they will have to be subtracted here
16991700
let remaining_value =
17001701
total_input_satoshis.saturating_sub(our_contribution).saturating_sub(fees_sats);
17011702

0 commit comments

Comments
 (0)