@@ -31,8 +31,6 @@ use bitcoin::hashes::{Hash, HashEngine, HmacEngine};
31
31
use bitcoin::secp256k1::Secp256k1;
32
32
use bitcoin::secp256k1::{PublicKey, SecretKey};
33
33
use bitcoin::{secp256k1, Sequence, SignedAmount};
34
- #[cfg(splicing)]
35
- use bitcoin::{ScriptBuf, TxIn, Weight};
36
34
37
35
use crate::blinded_path::message::MessageForwardNode;
38
36
use crate::blinded_path::message::{AsyncPaymentsContext, OffersContext};
@@ -57,6 +55,8 @@ use crate::events::{
57
55
};
58
56
use crate::events::{FundingInfo, PaidBolt12Invoice};
59
57
use crate::ln::chan_utils::selected_commitment_sat_per_1000_weight;
58
+ #[cfg(splicing)]
59
+ use crate::ln::channel::FundingTxContributions;
60
60
// Since this struct is returned in `list_channels` methods, expose it here in case users want to
61
61
// construct one themselves.
62
62
use crate::ln::channel::{
@@ -4437,13 +4437,12 @@ where
4437
4437
#[rustfmt::skip]
4438
4438
pub fn splice_channel(
4439
4439
&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey, our_funding_contribution_satoshis: i64,
4440
- our_funding_inputs: Vec<(TxIn, Transaction, Weight)>, change_script: Option<ScriptBuf>,
4441
- funding_feerate_per_kw: u32, locktime: Option<u32>,
4440
+ funding_tx_contributions: FundingTxContributions, funding_feerate_per_kw: u32, locktime: Option<u32>,
4442
4441
) -> Result<(), APIError> {
4443
4442
let mut res = Ok(());
4444
4443
PersistenceNotifierGuard::optionally_notify(self, || {
4445
4444
let result = self.internal_splice_channel(
4446
- channel_id, counterparty_node_id, our_funding_contribution_satoshis, our_funding_inputs, change_script , funding_feerate_per_kw, locktime
4445
+ channel_id, counterparty_node_id, our_funding_contribution_satoshis, funding_tx_contributions , funding_feerate_per_kw, locktime
4447
4446
);
4448
4447
res = result;
4449
4448
match res {
@@ -4458,8 +4457,7 @@ where
4458
4457
#[cfg(splicing)]
4459
4458
fn internal_splice_channel(
4460
4459
&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey,
4461
- our_funding_contribution_satoshis: i64,
4462
- our_funding_inputs: Vec<(TxIn, Transaction, Weight)>, change_script: Option<ScriptBuf>,
4460
+ our_funding_contribution_satoshis: i64, funding_tx_contributions: FundingTxContributions,
4463
4461
funding_feerate_per_kw: u32, locktime: Option<u32>,
4464
4462
) -> Result<(), APIError> {
4465
4463
let per_peer_state = self.per_peer_state.read().unwrap();
@@ -4483,8 +4481,7 @@ where
4483
4481
if let Some(chan) = chan_phase_entry.get_mut().as_funded_mut() {
4484
4482
let msg = chan.splice_channel(
4485
4483
our_funding_contribution_satoshis,
4486
- our_funding_inputs,
4487
- change_script,
4484
+ funding_tx_contributions,
4488
4485
funding_feerate_per_kw,
4489
4486
locktime,
4490
4487
)?;
0 commit comments