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 Jul 11, 2024
1 parent e8cabb8 commit a46da5a
Showing 1 changed file with 4 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 @@ -1092,6 +1092,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 @@ -3908,6 +3909,7 @@ pub(super) struct DualFundingChannelContext {
// Counterparty designates channel data owned by the another channel participant entity.
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
pub context: ChannelContext<SP>,
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled.
pub dual_funding_channel_context: Option<DualFundingChannelContext>,
/// The current interactive transaction construction session under negotiation.
pub interactive_tx_constructor: Option<InteractiveTxConstructor>,
Expand Down Expand Up @@ -8509,6 +8511,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>(
fee_estimator: &LowerBoundedFeeEstimator<F>, entropy_source: &ES, signer_provider: &SP,
counterparty_node_id: PublicKey, their_features: &InitFeatures, funding_satoshis: u64,
Expand Down Expand Up @@ -8838,6 +8841,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

0 comments on commit a46da5a

Please sign in to comment.