Skip to content

Commit df187b8

Browse files
committed
Temporarily allow some unused dual-funding code
1 parent 4e2adc7 commit df187b8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ impl_writeable_tlv_based!(PendingChannelMonitorUpdate, {
11251125
pub(super) enum ChannelPhase<SP: Deref> where SP::Target: SignerProvider {
11261126
UnfundedOutboundV1(OutboundV1Channel<SP>),
11271127
UnfundedInboundV1(InboundV1Channel<SP>),
1128+
#[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled.
11281129
UnfundedOutboundV2(OutboundV2Channel<SP>),
11291130
UnfundedInboundV2(InboundV2Channel<SP>),
11301131
Funded(Channel<SP>),
@@ -3925,6 +3926,7 @@ pub(super) fn calculate_our_funding_satoshis(
39253926
pub(super) struct DualFundingChannelContext {
39263927
/// The amount in satoshis we will be contributing to the channel.
39273928
pub our_funding_satoshis: u64,
3929+
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled.
39283930
/// The amount in satoshis our counterparty will be contributing to the channel.
39293931
pub their_funding_satoshis: Option<u64>,
39303932
/// The funding transaction locktime suggested by the initiator. If set by us, it is always set
@@ -3944,6 +3946,7 @@ pub(super) struct DualFundingChannelContext {
39443946
// Counterparty designates channel data owned by the another channel participant entity.
39453947
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
39463948
pub context: ChannelContext<SP>,
3949+
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled.
39473950
pub dual_funding_channel_context: Option<DualFundingChannelContext>,
39483951
/// The current interactive transaction construction session under negotiation.
39493952
pub interactive_tx_constructor: Option<InteractiveTxConstructor>,
@@ -8643,6 +8646,7 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
86438646
}
86448647

86458648
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8649+
#[allow(dead_code)] // TODO(dual_funding): Remove once creating V2 channels is enabled.
86468650
pub fn new<ES: Deref, F: Deref, L: Deref>(
86478651
fee_estimator: &LowerBoundedFeeEstimator<F>, entropy_source: &ES, signer_provider: &SP,
86488652
counterparty_node_id: PublicKey, their_features: &InitFeatures, funding_satoshis: u64,
@@ -8965,6 +8969,7 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
89658969
///
89668970
/// [`msgs::AcceptChannelV2`]: crate::ln::msgs::AcceptChannelV2
89678971
#[cfg(test)]
8972+
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled.
89688973
pub fn get_accept_channel_v2_message(&self) -> msgs::AcceptChannelV2 {
89698974
self.generate_accept_channel_v2_message()
89708975
}

lightning/src/ln/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ mod async_signer_tests;
9696
#[cfg(test)]
9797
#[allow(unused_mut)]
9898
mod offers_tests;
99+
#[allow(dead_code)] // TODO(dual_funding): Remove once contribution to V2 channels is enabled.
99100
pub(crate) mod interactivetxs;
100101

101102
pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN;

0 commit comments

Comments
 (0)