File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1757,6 +1757,7 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
1757
1757
let change_output_weight = get_output_weight(&change_output.script_pubkey).to_wu();
1758
1758
let change_output_fee = fee_for_weight(self.dual_funding_context.funding_feerate_sat_per_1000_weight, change_output_weight);
1759
1759
change_output.value = Amount::from_sat(change_value.saturating_sub(change_output_fee));
1760
+ // Note: dust check not done here, should be handled before
1760
1761
funding_outputs.push(OutputOwned::Single(change_output));
1761
1762
}
1762
1763
Original file line number Diff line number Diff line change @@ -1694,6 +1694,7 @@ pub(super) fn calculate_change_output_value(
1694
1694
let total_input_satoshis: u64 =
1695
1695
funding_inputs_prev_outputs. iter ( ) . map ( |out| out. value . to_sat ( ) ) . sum ( ) ;
1696
1696
1697
+ // Note: in case of additional outputs, they will have to be subtracted here
1697
1698
let remaining_value =
1698
1699
total_input_satoshis. saturating_sub ( our_contribution) . saturating_sub ( fees_sats) ;
1699
1700
You can’t perform that action at this time.
0 commit comments