Skip to content

Commit 755511f

Browse files
committed
f - include shared_funding_input
1 parent 1c65e18 commit 755511f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ use crate::ln::channelmanager::{
5858
use crate::ln::interactivetxs::{
5959
calculate_change_output_value, get_output_weight, AbortReason, HandleTxCompleteResult,
6060
InteractiveTxConstructor, InteractiveTxConstructorArgs, InteractiveTxMessageSend,
61-
InteractiveTxMessageSendResult, InteractiveTxSigningSession, SharedOwnedOutput,
62-
TX_COMMON_FIELDS_WEIGHT,
61+
InteractiveTxMessageSendResult, InteractiveTxSigningSession, SharedOwnedInput,
62+
SharedOwnedOutput, TX_COMMON_FIELDS_WEIGHT,
6363
};
6464
use crate::ln::msgs;
6565
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError, OnionErrorPacket};
@@ -2769,7 +2769,7 @@ where
27692769
fn begin_interactive_funding_tx_construction<ES: Deref>(
27702770
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
27712771
is_initiator: bool, change_destination_opt: Option<ScriptBuf>,
2772-
prev_funding_input: Option<(TxIn, TransactionU16LenLimited)>,
2772+
shared_funding_input: Option<SharedOwnedInput>,
27732773
) -> Result<Option<InteractiveTxMessageSend>, AbortReason>
27742774
where
27752775
ES::Target: EntropySource,
@@ -2780,12 +2780,6 @@ where
27802780
let mut funding_inputs = Vec::new();
27812781
mem::swap(&mut self.funding_negotiation_context.our_funding_inputs, &mut funding_inputs);
27822782

2783-
if is_initiator {
2784-
if let Some(prev_funding_input) = prev_funding_input {
2785-
funding_inputs.push(prev_funding_input);
2786-
}
2787-
}
2788-
27892783
// Add output for funding tx
27902784
// Note: For the error case when the inputs are insufficient, it will be handled after
27912785
// the `calculate_change_output_value` call below
@@ -2841,7 +2835,7 @@ where
28412835
is_initiator,
28422836
funding_tx_locktime: self.funding_negotiation_context.funding_tx_locktime,
28432837
inputs_to_contribute: funding_inputs,
2844-
shared_funding_input: None,
2838+
shared_funding_input,
28452839
shared_funding_output: SharedOwnedOutput::new(
28462840
shared_funding_output,
28472841
self.funding_negotiation_context.our_funding_satoshis,

0 commit comments

Comments
 (0)