@@ -49,7 +49,6 @@ use crate::ln::inbound_payment;
49
49
use crate::ln::types::ChannelId;
50
50
use crate::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
51
51
use crate::ln::channel::{self, Channel, ChannelError, ChannelUpdateStatus, FundedChannel, ShutdownResult, UpdateFulfillCommitFetch, OutboundV1Channel, ReconnectionMsg, InboundV1Channel, WithChannelContext};
52
- #[cfg(any(dual_funding, splicing))]
53
52
use crate::ln::channel::PendingV2Channel;
54
53
use crate::ln::channel_state::ChannelDetails;
55
54
use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
@@ -1450,13 +1449,11 @@ impl <SP: Deref> PeerState<SP> where SP::Target: SignerProvider {
1450
1449
#[derive(Clone)]
1451
1450
pub(super) enum OpenChannelMessage {
1452
1451
V1(msgs::OpenChannel),
1453
- #[cfg(dual_funding)]
1454
1452
V2(msgs::OpenChannelV2),
1455
1453
}
1456
1454
1457
1455
pub(super) enum OpenChannelMessageRef<'a> {
1458
1456
V1(&'a msgs::OpenChannel),
1459
- #[cfg(dual_funding)]
1460
1457
V2(&'a msgs::OpenChannelV2),
1461
1458
}
1462
1459
@@ -7846,7 +7843,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
7846
7843
(*temporary_channel_id, Channel::from(channel), message_send_event)
7847
7844
})
7848
7845
},
7849
- #[cfg(dual_funding)]
7850
7846
OpenChannelMessage::V2(open_channel_msg) => {
7851
7847
PendingV2Channel::new_inbound(
7852
7848
&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/
8009
8005
fn internal_open_channel(&self, counterparty_node_id: &PublicKey, msg: OpenChannelMessageRef<'_>) -> Result<(), MsgHandleErrInternal> {
8010
8006
let common_fields = match msg {
8011
8007
OpenChannelMessageRef::V1(msg) => &msg.common_fields,
8012
- #[cfg(dual_funding)]
8013
8008
OpenChannelMessageRef::V2(msg) => &msg.common_fields,
8014
8009
};
8015
8010
@@ -8087,7 +8082,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8087
8082
funding_satoshis: common_fields.funding_satoshis,
8088
8083
channel_negotiation_type: match msg {
8089
8084
OpenChannelMessageRef::V1(msg) => InboundChannelFunds::PushMsat(msg.push_msat),
8090
- #[cfg(dual_funding)]
8091
8085
OpenChannelMessageRef::V2(_) => InboundChannelFunds::DualFunded,
8092
8086
},
8093
8087
channel_type,
@@ -8097,7 +8091,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8097
8091
peer_state.inbound_channel_request_by_id.insert(channel_id, InboundChannelRequest {
8098
8092
open_channel_msg: match msg {
8099
8093
OpenChannelMessageRef::V1(msg) => OpenChannelMessage::V1(msg.clone()),
8100
- #[cfg(dual_funding)]
8101
8094
OpenChannelMessageRef::V2(msg) => OpenChannelMessage::V2(msg.clone()),
8102
8095
},
8103
8096
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/
8133
8126
});
8134
8127
(Channel::from(channel), message_send_event)
8135
8128
},
8136
- #[cfg(dual_funding)]
8137
8129
OpenChannelMessageRef::V2(msg) => {
8138
8130
let channel = PendingV2Channel::new_inbound(
8139
8131
&self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -11659,7 +11651,6 @@ where
11659
11651
// Note that we never need to persist the updated ChannelManager for an inbound
11660
11652
// open_channel message - pre-funded channels are never written so there should be no
11661
11653
// change to the contents.
11662
- #[cfg(dual_funding)]
11663
11654
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {
11664
11655
let res = self.internal_open_channel(&counterparty_node_id, OpenChannelMessageRef::V2(msg));
11665
11656
let persist = match &res {
@@ -11672,10 +11663,6 @@ where
11672
11663
let _ = handle_error!(self, res, counterparty_node_id);
11673
11664
persist
11674
11665
});
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);
11679
11666
}
11680
11667
11681
11668
fn handle_accept_channel(&self, counterparty_node_id: PublicKey, msg: &msgs::AcceptChannel) {
@@ -12074,7 +12061,6 @@ where
12074
12061
node_id: chan.context().get_counterparty_node_id(),
12075
12062
msg,
12076
12063
}),
12077
- #[cfg(dual_funding)]
12078
12064
ReconnectionMsg::Open(OpenChannelMessage::V2(msg)) =>
12079
12065
pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
12080
12066
node_id: chan.context().get_counterparty_node_id(),
@@ -12181,7 +12167,6 @@ where
12181
12167
});
12182
12168
return;
12183
12169
},
12184
- #[cfg(dual_funding)]
12185
12170
Ok(Some(OpenChannelMessage::V2(msg))) => {
12186
12171
peer_state.pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
12187
12172
node_id: counterparty_node_id,
@@ -12751,7 +12736,6 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
12751
12736
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
12752
12737
features.set_anchors_zero_fee_htlc_tx_optional();
12753
12738
}
12754
- #[cfg(dual_funding)]
12755
12739
features.set_dual_fund_optional();
12756
12740
// Only signal quiescence support in tests for now, as we don't yet support any
12757
12741
// quiescent-dependent protocols (e.g., splicing).
0 commit comments