@@ -31,8 +31,6 @@ use bitcoin::hashes::{Hash, HashEngine, HmacEngine};
3131use bitcoin::secp256k1::Secp256k1;
3232use bitcoin::secp256k1::{PublicKey, SecretKey};
3333use bitcoin::{secp256k1, Sequence, SignedAmount};
34- #[cfg(splicing)]
35- use bitcoin::{Amount, ScriptBuf};
3634
3735use crate::blinded_path::message::MessageForwardNode;
3836use crate::blinded_path::message::{AsyncPaymentsContext, OffersContext};
@@ -66,7 +64,7 @@ use crate::ln::channel::{
6664};
6765use crate::ln::channel_state::ChannelDetails;
6866#[cfg(splicing)]
69- use crate::ln::funding::FundingTxInput ;
67+ use crate::ln::funding::SpliceContribution ;
7068use crate::ln::inbound_payment;
7169use crate::ln::interactivetxs::{HandleTxCompleteResult, InteractiveTxMessageSendResult};
7270use crate::ln::msgs;
@@ -202,47 +200,6 @@ pub use crate::ln::outbound_payment::{
202200};
203201use crate::ln::script::ShutdownScript;
204202
205- /// The components of a splice's funding transaction that are contributed by one party.
206- #[cfg(splicing)]
207- pub enum SpliceContribution {
208- /// When funds are added to a channel.
209- SpliceIn {
210- /// The amount to contribute to the splice.
211- value: Amount,
212-
213- /// The inputs included in the splice's funding transaction to meet the contributed amount.
214- /// Any excess amount will be sent to a change output.
215- inputs: Vec<FundingTxInput>,
216-
217- /// An optional change output script. This will be used if needed or, when not set,
218- /// generated using [`SignerProvider::get_destination_script`].
219- change_script: Option<ScriptBuf>,
220- },
221- }
222-
223- #[cfg(splicing)]
224- impl SpliceContribution {
225- pub(super) fn value(&self) -> SignedAmount {
226- match self {
227- SpliceContribution::SpliceIn { value, .. } => {
228- value.to_signed().unwrap_or(SignedAmount::MAX)
229- },
230- }
231- }
232-
233- pub(super) fn inputs(&self) -> &[FundingTxInput] {
234- match self {
235- SpliceContribution::SpliceIn { inputs, .. } => &inputs[..],
236- }
237- }
238-
239- pub(super) fn into_tx_parts(self) -> (Vec<FundingTxInput>, Option<ScriptBuf>) {
240- match self {
241- SpliceContribution::SpliceIn { inputs, change_script, .. } => (inputs, change_script),
242- }
243- }
244- }
245-
246203// We hold various information about HTLC relay in the HTLC objects in Channel itself:
247204//
248205// Upon receipt of an HTLC from a peer, we'll give it a PendingHTLCStatus indicating if it should
0 commit comments