Skip to content

Commit 021887e

Browse files
committed
Drop lightning::ln::features::* type aliases
These were deprecated in 0.0.124, and we drop them here in favor of `lightning::types::features::*`.
1 parent ad19d93 commit 021887e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+71
-80
lines changed

lightning-background-processor/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,6 @@ mod tests {
10871087
use lightning::ln::channelmanager::{
10881088
ChainParameters, PaymentId, BREAKDOWN_TIMEOUT, MIN_CLTV_EXPIRY_DELTA,
10891089
};
1090-
use lightning::ln::features::{ChannelFeatures, NodeFeatures};
10911090
use lightning::ln::functional_test_utils::*;
10921091
use lightning::ln::msgs::{ChannelMessageHandler, Init};
10931092
use lightning::ln::peer_handler::{
@@ -1099,6 +1098,7 @@ mod tests {
10991098
use lightning::routing::router::{CandidateRouteHop, DefaultRouter, Path, RouteHop};
11001099
use lightning::routing::scoring::{ChannelUsage, LockableScore, ScoreLookUp, ScoreUpdate};
11011100
use lightning::sign::{ChangeDestinationSource, InMemorySigner, KeysManager};
1101+
use lightning::types::features::{ChannelFeatures, NodeFeatures};
11021102
use lightning::util::config::UserConfig;
11031103
use lightning::util::persist::{
11041104
KVStore, CHANNEL_MANAGER_PERSISTENCE_KEY, CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE,

lightning-net-tokio/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,10 @@ mod tests {
624624
use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
625625
use bitcoin::Network;
626626
use lightning::events::*;
627-
use lightning::ln::features::*;
628627
use lightning::ln::msgs::*;
629628
use lightning::ln::peer_handler::{IgnoringMessageHandler, MessageHandler, PeerManager};
630629
use lightning::routing::gossip::NodeId;
630+
use lightning::types::features::*;
631631
use lightning::util::test_utils::TestNodeSigner;
632632

633633
use tokio::sync::mpsc;

lightning-rapid-gossip-sync/src/processing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
2222

2323
#[cfg(all(not(feature = "std"), not(test)))]
2424
use alloc::{borrow::ToOwned, vec::Vec};
25-
use lightning::ln::features::NodeFeatures;
25+
use lightning::types::features::NodeFeatures;
2626

2727
/// The purpose of this prefix is to identify the serialization format, should other rapid gossip
2828
/// sync formats arise in the future.

lightning/src/blinded_path/payment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::io;
1818
use crate::io::Cursor;
1919
use crate::ln::types::PaymentSecret;
2020
use crate::ln::channel_state::CounterpartyForwardingInfo;
21-
use crate::ln::features::BlindedHopFeatures;
21+
use crate::types::features::BlindedHopFeatures;
2222
use crate::ln::msgs::DecodeError;
2323
use crate::ln::onion_utils;
2424
use crate::offers::invoice_request::InvoiceRequestFields;
@@ -633,7 +633,7 @@ mod tests {
633633
use bitcoin::secp256k1::PublicKey;
634634
use crate::blinded_path::payment::{PaymentForwardNode, ForwardTlvs, ReceiveTlvs, PaymentConstraints, PaymentContext, PaymentRelay};
635635
use crate::ln::types::PaymentSecret;
636-
use crate::ln::features::BlindedHopFeatures;
636+
use crate::types::features::BlindedHopFeatures;
637637
use crate::ln::functional_test_utils::TEST_FINAL_CLTV;
638638

639639
#[test]

lightning/src/chain/channelmonitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5018,7 +5018,7 @@ mod tests {
50185018
use crate::util::logger::Logger;
50195019
use crate::sync::Arc;
50205020
use crate::io;
5021-
use crate::ln::features::ChannelTypeFeatures;
5021+
use crate::types::features::ChannelTypeFeatures;
50225022

50235023
#[allow(unused_imports)]
50245024
use crate::prelude::*;

lightning/src/chain/onchaintx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use core::cmp;
4444
use core::ops::Deref;
4545
use core::mem::replace;
4646
use core::mem::swap;
47-
use crate::ln::features::ChannelTypeFeatures;
47+
use crate::types::features::ChannelTypeFeatures;
4848

4949
const MAX_ALLOC_SIZE: usize = 64*1024;
5050

lightning/src/chain/package.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use bitcoin::transaction::Version;
2626

2727
use crate::ln::types::PaymentPreimage;
2828
use crate::ln::chan_utils::{self, TxCreationKeys, HTLCOutputInCommitment};
29-
use crate::ln::features::ChannelTypeFeatures;
29+
use crate::types::features::ChannelTypeFeatures;
3030
use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
3131
use crate::ln::msgs::DecodeError;
3232
use crate::chain::chaininterface::{FeeEstimator, ConfirmationTarget, MIN_RELAY_FEE_SAT_PER_1000_WEIGHT, compute_feerate_sat_per_1000_weight, FEERATE_FLOOR_SATS_PER_KW};
@@ -1211,7 +1211,7 @@ mod tests {
12111211

12121212
use bitcoin::secp256k1::{PublicKey,SecretKey};
12131213
use bitcoin::secp256k1::Secp256k1;
1214-
use crate::ln::features::ChannelTypeFeatures;
1214+
use crate::types::features::ChannelTypeFeatures;
12151215

12161216
use std::str::FromStr;
12171217

lightning/src/events/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::blinded_path::payment::{Bolt12OfferContext, Bolt12RefundContext, Paym
2323
use crate::chain::transaction;
2424
use crate::ln::channelmanager::{InterceptId, PaymentId, RecipientOnionFields};
2525
use crate::ln::channel::FUNDING_CONF_DEADLINE_BLOCKS;
26-
use crate::ln::features::ChannelTypeFeatures;
26+
use crate::types::features::ChannelTypeFeatures;
2727
use crate::ln::msgs;
2828
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
2929
use crate::offers::invoice::Bolt12Invoice;

lightning/src/ln/blinded_payment_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsP
1717
use crate::ln::types::{ChannelId, PaymentHash, PaymentSecret};
1818
use crate::ln::channelmanager;
1919
use crate::ln::channelmanager::{HTLCFailureMsg, PaymentId, RecipientOnionFields};
20-
use crate::ln::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};
20+
use crate::types::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};
2121
use crate::ln::functional_test_utils::*;
2222
use crate::ln::msgs;
2323
use crate::ln::msgs::{ChannelMessageHandler, UnsignedGossipMessage};

lightning/src/ln/chan_utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use crate::util::transaction_utils::sort_outputs;
4545
use crate::ln::channel::{INITIAL_COMMITMENT_NUMBER, ANCHOR_OUTPUT_VALUE_SATOSHI};
4646
use core::ops::Deref;
4747
use crate::chain;
48-
use crate::ln::features::ChannelTypeFeatures;
48+
use crate::types::features::ChannelTypeFeatures;
4949
use crate::crypto::utils::{sign, sign_with_aux_rand};
5050
use super::channel_keys::{DelayedPaymentBasepoint, DelayedPaymentKey, HtlcKey, HtlcBasepoint, RevocationKey, RevocationBasepoint};
5151

@@ -1903,7 +1903,7 @@ mod tests {
19031903
use bitcoin::hex::FromHex;
19041904
use crate::ln::types::PaymentHash;
19051905
use bitcoin::PublicKey as BitcoinPublicKey;
1906-
use crate::ln::features::ChannelTypeFeatures;
1906+
use crate::types::features::ChannelTypeFeatures;
19071907

19081908
#[allow(unused_imports)]
19091909
use crate::prelude::*;

lightning/src/ln/channel.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use bitcoin::secp256k1::{Secp256k1,ecdsa::Signature};
2626
use bitcoin::secp256k1;
2727

2828
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash};
29-
use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
29+
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
3030
use crate::ln::msgs;
3131
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
3232
use crate::ln::script::{self, ShutdownScript};
@@ -9611,7 +9611,7 @@ mod tests {
96119611
use crate::ln::channel::InitFeatures;
96129612
use crate::ln::channel::{AwaitingChannelReadyFlags, Channel, ChannelState, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, HTLCUpdateAwaitingACK, commit_tx_fee_sat};
96139613
use crate::ln::channel::{MAX_FUNDING_SATOSHIS_NO_WUMBO, TOTAL_BITCOIN_SUPPLY_SATOSHIS, MIN_THEIR_CHAN_RESERVE_SATOSHIS};
9614-
use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
9614+
use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
96159615
use crate::ln::msgs;
96169616
use crate::ln::msgs::{ChannelUpdate, DecodeError, UnsignedChannelUpdate, MAX_VALUE_MSAT};
96179617
use crate::ln::script::ShutdownScript;

lightning/src/ln/channel_state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ use crate::chain::chaininterface::{FeeEstimator, LowerBoundedFeeEstimator};
1717
use crate::chain::transaction::OutPoint;
1818
use crate::io;
1919
use crate::ln::channel::ChannelContext;
20-
use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
2120
use crate::ln::msgs::DecodeError;
2221
use crate::ln::types::{ChannelId, PaymentHash};
2322
use crate::sign::SignerProvider;
23+
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
2424
use crate::util::config::ChannelConfig;
2525
use crate::util::ser::{Readable, Writeable, Writer};
2626

lightning/src/ln/channelmanager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ use crate::ln::inbound_payment;
5050
use crate::ln::types::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
5151
use crate::ln::channel::{self, Channel, ChannelPhase, ChannelContext, ChannelError, ChannelUpdateStatus, ShutdownResult, UnfundedChannelContext, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel, WithChannelContext};
5252
use crate::ln::channel_state::ChannelDetails;
53-
use crate::ln::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
53+
use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
5454
#[cfg(any(feature = "_test_utils", test))]
55-
use crate::ln::features::Bolt11InvoiceFeatures;
55+
use crate::types::features::Bolt11InvoiceFeatures;
5656
use crate::routing::router::{BlindedTail, InFlightHtlcs, Path, Payee, PaymentParameters, Route, RouteParameters, Router};
5757
use crate::ln::onion_payment::{check_incoming_htlc_cltv, create_recv_pending_htlc_info, create_fwd_pending_htlc_info, decode_incoming_update_add_htlc_onion, InboundHTLCErr, NextPacketDetails};
5858
use crate::ln::msgs;

lightning/src/ln/features.rs

+6-15
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,12 @@
77
// You may not use this file except in accordance with one or both of these
88
// licenses.
99

10-
//! Feature flag definitions for the Lightning protocol according to [BOLT #9].
11-
//!
12-
//! See [`lightning_types::features`] for the list of features currently supported.
13-
//!
14-
//! Note that the use of types via this module is deprecated and will be removed in a future
15-
//! version. Instead, use feature objects via [`lightning::types::features`].
16-
//!
17-
//! [`lightning::types::features`]: crate::types::features
18-
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
19-
20-
pub use lightning_types::features::Features;
21-
pub use lightning_types::features::{InitFeatures, NodeFeatures, ChannelFeatures};
22-
pub use lightning_types::features::{Bolt11InvoiceFeatures, OfferFeatures, InvoiceRequestFeatures};
23-
pub use lightning_types::features::{Bolt12InvoiceFeatures, BlindedHopFeatures};
24-
pub use lightning_types::features::ChannelTypeFeatures;
10+
//! Implementations of extensions on features.
11+
12+
use lightning_types::features::{InitFeatures, NodeFeatures, ChannelFeatures};
13+
use lightning_types::features::{Bolt11InvoiceFeatures, OfferFeatures, InvoiceRequestFeatures};
14+
use lightning_types::features::{Bolt12InvoiceFeatures, BlindedHopFeatures};
15+
use lightning_types::features::ChannelTypeFeatures;
2516

2617
#[allow(unused_imports)]
2718
use crate::prelude::*;

lightning/src/ln/functional_test_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::events::{ClaimedHTLC, ClosureReason, Event, HTLCDestination, MessageS
1717
use crate::events::bump_transaction::{BumpTransactionEvent, BumpTransactionEventHandler, Wallet, WalletSource};
1818
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
1919
use crate::ln::channelmanager::{AChannelManager, ChainParameters, ChannelManager, ChannelManagerReadArgs, RAACommitmentOrder, PaymentSendFailure, RecipientOnionFields, PaymentId, MIN_CLTV_EXPIRY_DELTA};
20-
use crate::ln::features::InitFeatures;
20+
use crate::types::features::InitFeatures;
2121
use crate::ln::msgs;
2222
use crate::ln::msgs::{ChannelMessageHandler, OnionMessageHandler, RoutingMessageHandler};
2323
use crate::ln::peer_handler::IgnoringMessageHandler;

lightning/src/ln/functional_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::ln::{chan_utils, onion_utils};
2727
use crate::ln::chan_utils::{commitment_tx_base_weight, COMMITMENT_TX_WEIGHT_PER_HTLC, OFFERED_HTLC_SCRIPT_WEIGHT, htlc_success_tx_weight, htlc_timeout_tx_weight, HTLCOutputInCommitment};
2828
use crate::routing::gossip::{NetworkGraph, NetworkUpdate};
2929
use crate::routing::router::{Path, PaymentParameters, Route, RouteHop, get_route, RouteParameters};
30-
use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
30+
use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
3131
use crate::ln::msgs;
3232
use crate::ln::msgs::{ChannelMessageHandler, RoutingMessageHandler, ErrorAction};
3333
use crate::util::test_channel_signer::TestChannelSigner;

lightning/src/ln/max_payment_path_len_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::events::{Event, MessageSendEventsProvider};
1717
use crate::ln::PaymentSecret;
1818
use crate::ln::blinded_payment_tests::get_blinded_route_parameters;
1919
use crate::ln::channelmanager::PaymentId;
20-
use crate::ln::features::BlindedHopFeatures;
20+
use crate::types::features::BlindedHopFeatures;
2121
use crate::ln::functional_test_utils::*;
2222
use crate::ln::msgs;
2323
use crate::ln::msgs::OnionMessageHandler;

lightning/src/ln/msgs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use bitcoin::hash_types::Txid;
3333

3434
use crate::blinded_path::payment::{BlindedPaymentTlvs, ForwardTlvs, ReceiveTlvs};
3535
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
36-
use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
36+
use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
3737
use crate::ln::onion_utils;
3838
use crate::onion_message;
3939
use crate::sign::{NodeSigner, Recipient};
@@ -1747,7 +1747,7 @@ mod fuzzy_internal_msgs {
17471747
use bitcoin::secp256k1::PublicKey;
17481748
use crate::blinded_path::payment::{PaymentConstraints, PaymentContext, PaymentRelay};
17491749
use crate::ln::types::{PaymentPreimage, PaymentSecret};
1750-
use crate::ln::features::BlindedHopFeatures;
1750+
use crate::types::features::BlindedHopFeatures;
17511751
use super::{FinalOnionHopData, TrampolineOnionPacket};
17521752

17531753
#[allow(unused_imports)]
@@ -3299,7 +3299,7 @@ mod tests {
32993299
use bitcoin::{Amount, Transaction, TxIn, ScriptBuf, Sequence, Witness, TxOut};
33003300
use bitcoin::hex::DisplayHex;
33013301
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
3302-
use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
3302+
use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
33033303
use crate::ln::msgs::{self, FinalOnionHopData, OnionErrorPacket, CommonOpenChannelFields, CommonAcceptChannelFields, TrampolineOnionPacket};
33043304
use crate::ln::msgs::SocketAddress;
33053305
use crate::routing::gossip::{NodeAlias, NodeId};

lightning/src/ln/offers_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use crate::blinded_path::payment::{Bolt12OfferContext, Bolt12RefundContext, Paym
4949
use crate::blinded_path::message::{MessageContext, OffersContext};
5050
use crate::events::{ClosureReason, Event, MessageSendEventsProvider, PaymentFailureReason, PaymentPurpose};
5151
use crate::ln::channelmanager::{Bolt12PaymentError, MAX_SHORT_LIVED_RELATIVE_EXPIRY, PaymentId, RecentPaymentDetails, Retry, self};
52-
use crate::ln::features::Bolt12InvoiceFeatures;
52+
use crate::types::features::Bolt12InvoiceFeatures;
5353
use crate::ln::functional_test_utils::*;
5454
use crate::ln::inbound_payment::ExpandedKey;
5555
use crate::ln::msgs::{ChannelMessageHandler, Init, NodeAnnouncement, OnionMessage, OnionMessageHandler, RoutingMessageHandler, SocketAddress, UnsignedGossipMessage, UnsignedNodeAnnouncement};

lightning/src/ln/onion_payment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::blinded_path::payment::{PaymentConstraints, PaymentRelay};
1313
use crate::chain::channelmonitor::{HTLC_FAIL_BACK_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS};
1414
use crate::ln::types::PaymentHash;
1515
use crate::ln::channelmanager::{BlindedFailure, BlindedForward, CLTV_FAR_FAR_AWAY, HTLCFailureMsg, MIN_CLTV_EXPIRY_DELTA, PendingHTLCInfo, PendingHTLCRouting};
16-
use crate::ln::features::BlindedHopFeatures;
16+
use crate::types::features::BlindedHopFeatures;
1717
use crate::ln::msgs;
1818
use crate::ln::onion_utils;
1919
use crate::ln::onion_utils::{HTLCFailReason, INVALID_ONION_BLINDING};
@@ -510,7 +510,7 @@ mod tests {
510510
use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
511511
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
512512
use crate::ln::channelmanager::RecipientOnionFields;
513-
use crate::ln::features::{ChannelFeatures, NodeFeatures};
513+
use crate::types::features::{ChannelFeatures, NodeFeatures};
514514
use crate::ln::msgs;
515515
use crate::ln::onion_utils::create_payment_onion;
516516
use crate::routing::router::{Path, RouteHop};

lightning/src/ln/onion_route_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::ln::channelmanager::{HTLCForwardInfo, FailureCode, CLTV_FAR_FAR_AWAY,
2020
use crate::ln::onion_utils;
2121
use crate::routing::gossip::{NetworkUpdate, RoutingFees};
2222
use crate::routing::router::{get_route, PaymentParameters, Route, RouteParameters, RouteHint, RouteHintHop};
23-
use crate::ln::features::{InitFeatures, Bolt11InvoiceFeatures};
23+
use crate::types::features::{InitFeatures, Bolt11InvoiceFeatures};
2424
use crate::ln::functional_test_utils::test_default_channel_config;
2525
use crate::ln::msgs;
2626
use crate::ln::msgs::{ChannelMessageHandler, ChannelUpdate, OutboundTrampolinePayload};

lightning/src/ln/onion_utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ use crate::crypto::chacha20::ChaCha20;
1212
use crate::crypto::streams::ChaChaReader;
1313
use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
1414
use crate::ln::channelmanager::{HTLCSource, RecipientOnionFields};
15-
use crate::ln::features::{ChannelFeatures, NodeFeatures};
1615
use crate::ln::msgs;
1716
use crate::ln::types::{PaymentHash, PaymentPreimage};
1817
use crate::routing::gossip::NetworkUpdate;
1918
use crate::routing::router::{Path, RouteHop, RouteParameters};
2019
use crate::sign::NodeSigner;
20+
use crate::types::features::{ChannelFeatures, NodeFeatures};
2121
use crate::util::errors::{self, APIError};
2222
use crate::util::logger::Logger;
2323
use crate::util::ser::{LengthCalculatingWriter, Readable, ReadableArgs, Writeable, Writer};
@@ -1270,10 +1270,10 @@ fn decode_next_hop<T, R: ReadableArgs<T>, N: NextPacketBytes>(
12701270
#[cfg(test)]
12711271
mod tests {
12721272
use crate::io;
1273-
use crate::ln::features::{ChannelFeatures, NodeFeatures};
12741273
use crate::ln::msgs;
12751274
use crate::ln::types::PaymentHash;
12761275
use crate::routing::router::{Path, Route, RouteHop};
1276+
use crate::types::features::{ChannelFeatures, NodeFeatures};
12771277
use crate::util::ser::{VecWriter, Writeable, Writer};
12781278

12791279
#[allow(unused_imports)]

lightning/src/ln/outbound_payment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::events::{self, PaymentFailureReason};
1818
use crate::ln::types::{PaymentHash, PaymentPreimage, PaymentSecret};
1919
use crate::ln::channel_state::ChannelDetails;
2020
use crate::ln::channelmanager::{EventCompletionAction, HTLCSource, PaymentId};
21-
use crate::ln::features::Bolt12InvoiceFeatures;
21+
use crate::types::features::Bolt12InvoiceFeatures;
2222
use crate::ln::onion_utils;
2323
use crate::ln::onion_utils::{DecodedOnionFailure, HTLCFailReason};
2424
use crate::offers::invoice::Bolt12Invoice;
@@ -2267,7 +2267,7 @@ mod tests {
22672267
use crate::events::{Event, PathFailure, PaymentFailureReason};
22682268
use crate::ln::types::{PaymentHash, PaymentPreimage};
22692269
use crate::ln::channelmanager::{PaymentId, RecipientOnionFields};
2270-
use crate::ln::features::{Bolt12InvoiceFeatures, ChannelFeatures, NodeFeatures};
2270+
use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, NodeFeatures};
22712271
use crate::ln::msgs::{ErrorAction, LightningError};
22722272
use crate::ln::outbound_payment::{Bolt12PaymentError, OutboundPayments, PendingOutboundPayment, Retry, RetryableSendFailure, StaleExpiration};
22732273
#[cfg(feature = "std")]

lightning/src/ln/payment_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::sign::EntropySource;
1717
use crate::events::{ClosureReason, Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentFailureReason, PaymentPurpose};
1818
use crate::ln::channel::{EXPIRE_PREV_CONFIG_TICKS, get_holder_selected_channel_reserve_satoshis, ANCHOR_OUTPUT_VALUE_SATOSHI};
1919
use crate::ln::channelmanager::{BREAKDOWN_TIMEOUT, MPP_TIMEOUT_TICKS, MIN_CLTV_EXPIRY_DELTA, PaymentId, PaymentSendFailure, RecentPaymentDetails, RecipientOnionFields, HTLCForwardInfo, PendingHTLCRouting, PendingAddHTLCInfo};
20-
use crate::ln::features::{Bolt11InvoiceFeatures, ChannelTypeFeatures};
20+
use crate::types::features::{Bolt11InvoiceFeatures, ChannelTypeFeatures};
2121
use crate::ln::msgs;
2222
use crate::ln::types::{ChannelId, PaymentHash, PaymentSecret, PaymentPreimage};
2323
use crate::ln::chan_utils;

lightning/src/ln/peer_handler.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::blinded_path::message::{AsyncPaymentsContext, DNSResolverContext, Off
2222
use crate::sign::{NodeSigner, Recipient};
2323
use crate::events::{MessageSendEvent, MessageSendEventsProvider};
2424
use crate::ln::types::ChannelId;
25-
use crate::ln::features::{InitFeatures, NodeFeatures};
25+
use crate::types::features::{InitFeatures, NodeFeatures};
2626
use crate::ln::msgs;
2727
use crate::ln::msgs::{ChannelMessageHandler, Init, LightningError, SocketAddress, OnionMessageHandler, RoutingMessageHandler};
2828
use crate::util::ser::{VecWriter, Writeable, Writer};
@@ -2712,7 +2712,7 @@ mod tests {
27122712
use crate::events;
27132713
use crate::io;
27142714
use crate::ln::types::ChannelId;
2715-
use crate::ln::features::{InitFeatures, NodeFeatures};
2715+
use crate::types::features::{InitFeatures, NodeFeatures};
27162716
use crate::ln::peer_channel_encryptor::PeerChannelEncryptor;
27172717
use crate::ln::peer_handler::{CustomMessageHandler, PeerManager, MessageHandler, SocketDescriptor, IgnoringMessageHandler, filter_addresses, ErroringMessageHandler, MAX_BUFFER_DRAIN_TICK_INTERVALS_PER_PEER};
27182718
use crate::ln::{msgs, wire};

0 commit comments

Comments
 (0)