From: Duncan Dean Date: Wed, 19 Jun 2024 19:03:33 +0000 (+0200) Subject: Temporarily allow some unused dual-funding code X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=c3896b55ad14814d54e0e118023fed717c1dd956;p=rust-lightning Temporarily allow some unused dual-funding code --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index ad2616edf..d2e31fddf 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -1129,6 +1129,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), @@ -4182,6 +4183,7 @@ pub(super) struct DualFundingChannelContext { /// Note that the `our_funding_satoshis` field is equal to the total value of `our_funding_inputs` /// minus any fees paid for our contributed weight. This means that change will never be generated /// and the maximum value possible will go towards funding the channel. + #[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled. pub our_funding_inputs: Vec<(TxIn, TransactionU16LenLimited)>, } @@ -8710,6 +8712,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, @@ -9021,6 +9024,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 85eb792df..087ec4df6 100644 --- a/lightning/src/ln/mod.rs +++ b/lightning/src/ln/mod.rs @@ -88,6 +88,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;