Skip to content

Commit a0caa50

Browse files
committed
Extend begin_interactive_...() with splicing-specific parameter
Extend begin_interactive_funding_tx_construction() with splicing-specific parameter: extra funding input.
1 parent c675ca1 commit a0caa50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,6 +2414,7 @@ pub(super) trait FundingTxConstructorV2<SP: Deref>: ChannelContextProvider<SP> w
24142414
fn begin_interactive_funding_tx_construction<ES: Deref>(
24152415
&mut self, signer_provider: &SP, entropy_source: &ES, holder_node_id: PublicKey,
24162416
change_destination_opt: Option<ScriptBuf>,
2417+
_is_splice: bool, prev_funding_input: Option<(TxIn, TransactionU16LenLimited)>,
24172418
) -> Result<Option<InteractiveTxMessageSend>, AbortReason>
24182419
where ES::Target: EntropySource
24192420
{
@@ -2424,7 +2425,9 @@ pub(super) trait FundingTxConstructorV2<SP: Deref>: ChannelContextProvider<SP> w
24242425
self.swap_out_dual_funding_context_inputs(&mut funding_inputs)
24252426
.map_err(|e| AbortReason::InternalError(e))?;
24262427

2427-
// TODO(splicing): Add prev funding tx as input, must be provided as a parameter
2428+
if let Some(prev_funding_input) = prev_funding_input {
2429+
funding_inputs.push(prev_funding_input);
2430+
}
24282431

24292432
// Add output for funding tx
24302433
// Note: For the error case when the inputs are insufficient, it will be handled after

0 commit comments

Comments
 (0)