Skip to content

Commit c839a36

Browse files
committed
f - total_input_witness_weight
1 parent 01bf037 commit c839a36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5918,16 +5918,16 @@ fn check_v2_funding_inputs_sufficient(
59185918
contribution_amount: i64, funding_inputs: &[FundingTxInput], is_initiator: bool,
59195919
is_splice: bool, funding_feerate_sat_per_1000_weight: u32,
59205920
) -> Result<u64, ChannelError> {
5921-
let mut total_input_witness_weight = Weight::from_wu(
5921+
let mut total_input_satisfaction_weight = Weight::from_wu(
59225922
funding_inputs.iter().map(|input| input.utxo.satisfaction_weight).sum(),
59235923
);
59245924
let mut funding_inputs_len = funding_inputs.len();
59255925
if is_initiator && is_splice {
59265926
// consider the weight of the input and witness needed for spending the old funding transaction
59275927
funding_inputs_len += 1;
5928-
total_input_witness_weight += Weight::from_wu(FUNDING_TRANSACTION_WITNESS_WEIGHT);
5928+
total_input_satisfaction_weight += Weight::from_wu(FUNDING_TRANSACTION_WITNESS_WEIGHT);
59295929
}
5930-
let estimated_fee = estimate_v2_funding_transaction_fee(is_initiator, funding_inputs_len, total_input_witness_weight, funding_feerate_sat_per_1000_weight);
5930+
let estimated_fee = estimate_v2_funding_transaction_fee(is_initiator, funding_inputs_len, total_input_satisfaction_weight, funding_feerate_sat_per_1000_weight);
59315931

59325932
let mut total_input_sats = 0u64;
59335933
for FundingTxInput { utxo, .. } in funding_inputs.iter() {

0 commit comments

Comments
 (0)