@@ -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};
@@ -1441,13 +1440,11 @@ impl <SP: Deref> PeerState<SP> where SP::Target: SignerProvider {
1441
1440
#[derive(Clone)]
1442
1441
pub(super) enum OpenChannelMessage {
1443
1442
V1(msgs::OpenChannel),
1444
- #[cfg(dual_funding)]
1445
1443
V2(msgs::OpenChannelV2),
1446
1444
}
1447
1445
1448
1446
pub(super) enum OpenChannelMessageRef<'a> {
1449
1447
V1(&'a msgs::OpenChannel),
1450
- #[cfg(dual_funding)]
1451
1448
V2(&'a msgs::OpenChannelV2),
1452
1449
}
1453
1450
@@ -7828,7 +7825,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
7828
7825
(*temporary_channel_id, Channel::from(channel), message_send_event)
7829
7826
})
7830
7827
},
7831
- #[cfg(dual_funding)]
7832
7828
OpenChannelMessage::V2(open_channel_msg) => {
7833
7829
PendingV2Channel::new_inbound(
7834
7830
&self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -7991,7 +7987,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
7991
7987
fn internal_open_channel(&self, counterparty_node_id: &PublicKey, msg: OpenChannelMessageRef<'_>) -> Result<(), MsgHandleErrInternal> {
7992
7988
let common_fields = match msg {
7993
7989
OpenChannelMessageRef::V1(msg) => &msg.common_fields,
7994
- #[cfg(dual_funding)]
7995
7990
OpenChannelMessageRef::V2(msg) => &msg.common_fields,
7996
7991
};
7997
7992
@@ -8069,7 +8064,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8069
8064
funding_satoshis: common_fields.funding_satoshis,
8070
8065
channel_negotiation_type: match msg {
8071
8066
OpenChannelMessageRef::V1(msg) => InboundChannelFunds::PushMsat(msg.push_msat),
8072
- #[cfg(dual_funding)]
8073
8067
OpenChannelMessageRef::V2(_) => InboundChannelFunds::DualFunded,
8074
8068
},
8075
8069
channel_type,
@@ -8079,7 +8073,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8079
8073
peer_state.inbound_channel_request_by_id.insert(channel_id, InboundChannelRequest {
8080
8074
open_channel_msg: match msg {
8081
8075
OpenChannelMessageRef::V1(msg) => OpenChannelMessage::V1(msg.clone()),
8082
- #[cfg(dual_funding)]
8083
8076
OpenChannelMessageRef::V2(msg) => OpenChannelMessage::V2(msg.clone()),
8084
8077
},
8085
8078
ticks_remaining: UNACCEPTED_INBOUND_CHANNEL_AGE_LIMIT_TICKS,
@@ -8115,7 +8108,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8115
8108
});
8116
8109
(Channel::from(channel), message_send_event)
8117
8110
},
8118
- #[cfg(dual_funding)]
8119
8111
OpenChannelMessageRef::V2(msg) => {
8120
8112
let channel = PendingV2Channel::new_inbound(
8121
8113
&self.fee_estimator, &self.entropy_source, &self.signer_provider,
@@ -11475,7 +11467,6 @@ where
11475
11467
// Note that we never need to persist the updated ChannelManager for an inbound
11476
11468
// open_channel message - pre-funded channels are never written so there should be no
11477
11469
// change to the contents.
11478
- #[cfg(dual_funding)]
11479
11470
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {
11480
11471
let res = self.internal_open_channel(&counterparty_node_id, OpenChannelMessageRef::V2(msg));
11481
11472
let persist = match &res {
@@ -11488,10 +11479,6 @@ where
11488
11479
let _ = handle_error!(self, res, counterparty_node_id);
11489
11480
persist
11490
11481
});
11491
- #[cfg(not(dual_funding))]
11492
- let _: Result<(), _> = handle_error!(self, Err(MsgHandleErrInternal::send_err_msg_no_close(
11493
- "Dual-funded channels not supported".to_owned(),
11494
- msg.common_fields.temporary_channel_id.clone())), counterparty_node_id);
11495
11482
}
11496
11483
11497
11484
fn handle_accept_channel(&self, counterparty_node_id: PublicKey, msg: &msgs::AcceptChannel) {
@@ -11879,7 +11866,6 @@ where
11879
11866
node_id: chan.context().get_counterparty_node_id(),
11880
11867
msg,
11881
11868
}),
11882
- #[cfg(dual_funding)]
11883
11869
ReconnectionMsg::Open(OpenChannelMessage::V2(msg)) =>
11884
11870
pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
11885
11871
node_id: chan.context().get_counterparty_node_id(),
@@ -11986,7 +11972,6 @@ where
11986
11972
});
11987
11973
return;
11988
11974
},
11989
- #[cfg(dual_funding)]
11990
11975
Ok(Some(OpenChannelMessage::V2(msg))) => {
11991
11976
peer_state.pending_msg_events.push(events::MessageSendEvent::SendOpenChannelV2 {
11992
11977
node_id: counterparty_node_id,
@@ -12556,7 +12541,6 @@ pub fn provided_init_features(config: &UserConfig) -> InitFeatures {
12556
12541
if config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx {
12557
12542
features.set_anchors_zero_fee_htlc_tx_optional();
12558
12543
}
12559
- #[cfg(dual_funding)]
12560
12544
features.set_dual_fund_optional();
12561
12545
features
12562
12546
}
0 commit comments