From 7e1cde22745f7432e54838f60a6251a38a703ae0 Mon Sep 17 00:00:00 2001 From: Duncan Dean Date: Wed, 19 Jun 2024 21:03:33 +0200 Subject: [PATCH] Temporarily allow some unused dual-funding code --- lightning/src/ln/channel.rs | 5 +++++ lightning/src/ln/mod.rs | 1 + 2 files changed, 6 insertions(+) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index a9e1860669f..428ce05b4f6 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -1125,6 +1125,7 @@ impl_writeable_tlv_based!(PendingChannelMonitorUpdate, { pub(super) enum ChannelPhase where SP::Target: SignerProvider { UnfundedOutboundV1(OutboundV1Channel), UnfundedInboundV1(InboundV1Channel), + #[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled. UnfundedOutboundV2(OutboundV2Channel), UnfundedInboundV2(InboundV2Channel), Funded(Channel), @@ -3983,6 +3984,7 @@ pub(super) fn calculate_our_funding_satoshis( pub(super) struct DualFundingChannelContext { /// The amount in satoshis we will be contributing to the channel. pub our_funding_satoshis: u64, + #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled. /// The amount in satoshis our counterparty will be contributing to the channel. pub their_funding_satoshis: Option, /// The funding transaction locktime suggested by the initiator. If set by us, it is always set @@ -4002,6 +4004,7 @@ pub(super) struct DualFundingChannelContext { // Counterparty designates channel data owned by the another channel participant entity. pub(super) struct Channel where SP::Target: SignerProvider { pub context: ChannelContext, + #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled. pub dual_funding_channel_context: Option, /// The current interactive transaction construction session under negotiation. pub interactive_tx_constructor: Option, @@ -8660,6 +8663,7 @@ pub(super) struct OutboundV2Channel where SP::Target: SignerProvider } impl OutboundV2Channel where SP::Target: SignerProvider { + #[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled. pub fn new( fee_estimator: &LowerBoundedFeeEstimator, entropy_source: &ES, signer_provider: &SP, counterparty_node_id: PublicKey, their_features: &InitFeatures, funding_satoshis: u64, @@ -8982,6 +8986,7 @@ impl InboundV2Channel where SP::Target: SignerProvider { /// /// [`msgs::AcceptChannelV2`]: crate::ln::msgs::AcceptChannelV2 #[cfg(test)] + #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled. pub fn get_accept_channel_v2_message(&self) -> msgs::AcceptChannelV2 { self.generate_accept_channel_v2_message() } diff --git a/lightning/src/ln/mod.rs b/lightning/src/ln/mod.rs index ac834b59561..4160ba416e8 100644 --- a/lightning/src/ln/mod.rs +++ b/lightning/src/ln/mod.rs @@ -96,6 +96,7 @@ mod async_signer_tests; #[cfg(test)] #[allow(unused_mut)] mod offers_tests; +#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled. pub(crate) mod interactivetxs; pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN;