Skip to content

Commit ac92a0f

Browse files
committed
fix Total fee fix for shared input
1 parent be2d74e commit ac92a0f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use bitcoin::{OutPoint, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, Wei
2121

2222
use crate::chain::chaininterface::fee_for_weight;
2323
use crate::events::bump_transaction::{BASE_INPUT_WEIGHT, EMPTY_SCRIPT_SIG_WEIGHT};
24+
use crate::ln::chan_utils::FUNDING_TRANSACTION_WITNESS_WEIGHT;
2425
use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
2526
use crate::ln::msgs;
2627
use crate::ln::msgs::{MessageSendEvent, SerialId, TxSignatures};
@@ -1925,7 +1926,7 @@ pub(super) fn calculate_change_output_value(
19251926
total_input_satoshis = total_input_satoshis.saturating_add(shared_input);
19261927
if is_initiator {
19271928
our_funding_inputs_weight =
1928-
our_funding_inputs_weight.saturating_add(P2WSH_INPUT_WEIGHT_LOWER_BOUND);
1929+
our_funding_inputs_weight.saturating_add(FUNDING_TRANSACTION_WITNESS_WEIGHT);
19291930
}
19301931
}
19311932

0 commit comments

Comments
 (0)