@@ -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
@@ -7843,7 +7840,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
7843
7840
(*temporary_channel_id, Channel::from(channel), message_send_event)
7844
7841
})
7845
7842
},
7846
- #[cfg(dual_funding)]
7847
7843
OpenChannelMessage::V2(open_channel_msg) => {
7848
7844
PendingV2Channel::new_inbound(
7849
7845
&self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -8006,7 +8002,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8006
8002
fn internal_open_channel(&self, counterparty_node_id: &PublicKey, msg: OpenChannelMessageRef<'_>) -> Result<(), MsgHandleErrInternal> {
8007
8003
let common_fields = match msg {
8008
8004
OpenChannelMessageRef::V1(msg) => &msg.common_fields,
8009
- #[cfg(dual_funding)]
8010
8005
OpenChannelMessageRef::V2(msg) => &msg.common_fields,
8011
8006
};
8012
8007
@@ -8084,7 +8079,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8084
8079
funding_satoshis: common_fields.funding_satoshis,
8085
8080
channel_negotiation_type: match msg {
8086
8081
OpenChannelMessageRef::V1(msg) => InboundChannelFunds::PushMsat(msg.push_msat),
8087
- #[cfg(dual_funding)]
8088
8082
OpenChannelMessageRef::V2(_) => InboundChannelFunds::DualFunded,
8089
8083
},
8090
8084
channel_type,
@@ -8094,7 +8088,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8094
8088
peer_state.inbound_channel_request_by_id.insert(channel_id, InboundChannelRequest {
8095
8089
open_channel_msg: match msg {
8096
8090
OpenChannelMessageRef::V1(msg) => OpenChannelMessage::V1(msg.clone()),
8097
- #[cfg(dual_funding)]
8098
8091
OpenChannelMessageRef::V2(msg) => OpenChannelMessage::V2(msg.clone()),
8099
8092
},
8100
8093
ticks_remaining: UNACCEPTED_INBOUND_CHANNEL_AGE_LIMIT_TICKS,
@@ -8130,7 +8123,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8130
8123
});
8131
8124
(Channel::from(channel), message_send_event)
8132
8125
},
8133
- #[cfg(dual_funding)]
8134
8126
OpenChannelMessageRef::V2(msg) => {
8135
8127
let channel = PendingV2Channel::new_inbound(
8136
8128
&self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -11656,7 +11648,6 @@ where
11656
11648
// Note that we never need to persist the updated ChannelManager for an inbound
11657
11649
// open_channel message - pre-funded channels are never written so there should be no
11658
11650
// change to the contents.
11659
- #[cfg(dual_funding)]
11660
11651
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {
11661
11652
let res = self.internal_open_channel(&counterparty_node_id, OpenChannelMessageRef::V2(msg));
11662
11653
let persist = match &res {
@@ -11669,10 +11660,6 @@ where
11669
11660
let _ = handle_error!(self, res, counterparty_node_id);
11670
11661
persist
11671
11662
});
11672
- #[cfg(not(dual_funding))]
11673
- let _: Result<(), _> = handle_error!(self, Err(MsgHandleErrInternal::send_err_msg_no_close(
11674
- "Dual-funded channels not supported".to_owned(),
11675
- msg.common_fields.temporary_channel_id.clone())), counterparty_node_id);
11676
11663
}
11677
11664
11678
11665
fn handle_accept_channel(&self, counterparty_node_id: PublicKey, msg: &msgs::AcceptChannel) {
@@ -12071,7 +12058,6 @@ where
12071
12058
node_id: chan.context().get_counterparty_node_id(),
12072
12059
msg,
12073
12060
}),
12074
- #[cfg(dual_funding)]
12075
12061
ReconnectionMsg::Open(OpenChannelMessage::V2(msg)) =>
12076
12062
pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
12077
12063
node_id: chan.context().get_counterparty_node_id(),
@@ -12178,7 +12164,6 @@ where
12178
12164
});
12179
12165
return;
12180
12166
},
12181
- #[cfg(dual_funding)]
12182
12167
Ok(Some(OpenChannelMessage::V2(msg))) => {
12183
12168
peer_state.pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
12184
12169
node_id: counterparty_node_id,
@@ -12748,7 +12733,6 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
12748
12733
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
12749
12734
features.set_anchors_zero_fee_htlc_tx_optional();
12750
12735
}
12751
- #[cfg(dual_funding)]
12752
12736
features.set_dual_fund_optional();
12753
12737
// Only signal quiescence support in tests for now, as we don't yet support any
12754
12738
// quiescent-dependent protocols (e.g., splicing).
0 commit comments