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 Sep 6, 2024
1 parent a9016e0 commit 9b46d1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,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 @@ -3910,6 +3911,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 All @@ -3929,6 +3931,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 @@ -8640,6 +8643,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 @@ -8978,6 +8982,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 9b46d1f

Please sign in to comment.