Skip to content

Commit

Permalink
Temporarily allow some unused dual-funding code
Browse files Browse the repository at this point in the history
  • Loading branch information
dunxen committed Nov 5, 2024
1 parent 4a74a05 commit 1a29af1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,7 @@ impl_writeable_tlv_based!(PendingChannelMonitorUpdate, {
pub(super) enum ChannelPhase<SP: Deref> where SP::Target: SignerProvider {
UnfundedOutboundV1(OutboundV1Channel<SP>),
UnfundedInboundV1(InboundV1Channel<SP>),
#[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled.
UnfundedOutboundV2(OutboundV2Channel<SP>),
UnfundedInboundV2(InboundV2Channel<SP>),
Funded(Channel<SP>),
Expand Down Expand Up @@ -4105,6 +4106,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<u64>,
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
Expand Down Expand Up @@ -8629,6 +8631,7 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
}

impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
#[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled.
pub fn new<ES: Deref, F: Deref, L: Deref>(
fee_estimator: &LowerBoundedFeeEstimator<F>, entropy_source: &ES, signer_provider: &SP,
counterparty_node_id: PublicKey, their_features: &InitFeatures, funding_satoshis: u64,
Expand Down Expand Up @@ -8942,6 +8945,7 @@ impl<SP: Deref> InboundV2Channel<SP> 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()
}
Expand Down
1 change: 1 addition & 0 deletions lightning/src/ln/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 1a29af1

Please sign in to comment.