@@ -49,7 +49,6 @@ use crate::ln::inbound_payment;
4949use crate::ln::types::ChannelId;
5050use crate::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
5151use crate::ln::channel::{self, Channel, ChannelError, ChannelUpdateStatus, FundedChannel, ShutdownResult, UpdateFulfillCommitFetch, OutboundV1Channel, ReconnectionMsg, InboundV1Channel, WithChannelContext};
52- #[cfg(any(dual_funding, splicing))]
5352use crate::ln::channel::PendingV2Channel;
5453use crate::ln::channel_state::ChannelDetails;
5554use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
@@ -1450,13 +1449,11 @@ impl <SP: Deref> PeerState<SP> where SP::Target: SignerProvider {
14501449#[derive(Clone)]
14511450pub(super) enum OpenChannelMessage {
14521451 V1(msgs::OpenChannel),
1453- #[cfg(dual_funding)]
14541452 V2(msgs::OpenChannelV2),
14551453}
14561454
14571455pub(super) enum OpenChannelMessageRef<'a> {
14581456 V1(&'a msgs::OpenChannel),
1459- #[cfg(dual_funding)]
14601457 V2(&'a msgs::OpenChannelV2),
14611458}
14621459
@@ -7846,7 +7843,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
78467843 (*temporary_channel_id, Channel::from(channel), message_send_event)
78477844 })
78487845 },
7849- #[cfg(dual_funding)]
78507846 OpenChannelMessage::V2(open_channel_msg) => {
78517847 PendingV2Channel::new_inbound(
78527848 &self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -8009,7 +8005,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
80098005 fn internal_open_channel(&self, counterparty_node_id: &PublicKey, msg: OpenChannelMessageRef<'_>) -> Result<(), MsgHandleErrInternal> {
80108006 let common_fields = match msg {
80118007 OpenChannelMessageRef::V1(msg) => &msg.common_fields,
8012- #[cfg(dual_funding)]
80138008 OpenChannelMessageRef::V2(msg) => &msg.common_fields,
80148009 };
80158010
@@ -8087,7 +8082,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
80878082 funding_satoshis: common_fields.funding_satoshis,
80888083 channel_negotiation_type: match msg {
80898084 OpenChannelMessageRef::V1(msg) => InboundChannelFunds::PushMsat(msg.push_msat),
8090- #[cfg(dual_funding)]
80918085 OpenChannelMessageRef::V2(_) => InboundChannelFunds::DualFunded,
80928086 },
80938087 channel_type,
@@ -8097,7 +8091,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
80978091 peer_state.inbound_channel_request_by_id.insert(channel_id, InboundChannelRequest {
80988092 open_channel_msg: match msg {
80998093 OpenChannelMessageRef::V1(msg) => OpenChannelMessage::V1(msg.clone()),
8100- #[cfg(dual_funding)]
81018094 OpenChannelMessageRef::V2(msg) => OpenChannelMessage::V2(msg.clone()),
81028095 },
81038096 ticks_remaining: UNACCEPTED_INBOUND_CHANNEL_AGE_LIMIT_TICKS,
@@ -8133,7 +8126,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
81338126 });
81348127 (Channel::from(channel), message_send_event)
81358128 },
8136- #[cfg(dual_funding)]
81378129 OpenChannelMessageRef::V2(msg) => {
81388130 let channel = PendingV2Channel::new_inbound(
81398131 &self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -11659,7 +11651,6 @@ where
1165911651 // Note that we never need to persist the updated ChannelManager for an inbound
1166011652 // open_channel message - pre-funded channels are never written so there should be no
1166111653 // change to the contents.
11662- #[cfg(dual_funding)]
1166311654 let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {
1166411655 let res = self.internal_open_channel(&counterparty_node_id, OpenChannelMessageRef::V2(msg));
1166511656 let persist = match &res {
@@ -11672,10 +11663,6 @@ where
1167211663 let _ = handle_error!(self, res, counterparty_node_id);
1167311664 persist
1167411665 });
11675- #[cfg(not(dual_funding))]
11676- let _: Result<(), _> = handle_error!(self, Err(MsgHandleErrInternal::send_err_msg_no_close(
11677- "Dual-funded channels not supported".to_owned(),
11678- msg.common_fields.temporary_channel_id.clone())), counterparty_node_id);
1167911666 }
1168011667
1168111668 fn handle_accept_channel(&self, counterparty_node_id: PublicKey, msg: &msgs::AcceptChannel) {
@@ -12074,7 +12061,6 @@ where
1207412061 node_id: chan.context().get_counterparty_node_id(),
1207512062 msg,
1207612063 }),
12077- #[cfg(dual_funding)]
1207812064 ReconnectionMsg::Open(OpenChannelMessage::V2(msg)) =>
1207912065 pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
1208012066 node_id: chan.context().get_counterparty_node_id(),
@@ -12181,7 +12167,6 @@ where
1218112167 });
1218212168 return;
1218312169 },
12184- #[cfg(dual_funding)]
1218512170 Ok(Some(OpenChannelMessage::V2(msg))) => {
1218612171 peer_state.pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
1218712172 node_id: counterparty_node_id,
@@ -12751,7 +12736,6 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
1275112736 if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
1275212737 features.set_anchors_zero_fee_htlc_tx_optional();
1275312738 }
12754- #[cfg(dual_funding)]
1275512739 features.set_dual_fund_optional();
1275612740 // Only signal quiescence support in tests for now, as we don't yet support any
1275712741 // quiescent-dependent protocols (e.g., splicing).
0 commit comments