]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Drop `lightning::ln::features::*` type aliases
authorMatt Corallo <git@bluematt.me>
Sat, 12 Oct 2024 21:34:36 +0000 (21:34 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 13 Oct 2024 13:52:56 +0000 (13:52 +0000)
These were deprecated in 0.0.124, and we drop them here in favor of
`lightning::types::features::*`.

48 files changed:
fuzz/src/invoice_request_deser.rs
fuzz/src/onion_message.rs
fuzz/src/refund_deser.rs
fuzz/src/router.rs
lightning-background-processor/src/lib.rs
lightning-custom-message/src/lib.rs
lightning-net-tokio/src/lib.rs
lightning-rapid-gossip-sync/src/processing.rs
lightning/src/blinded_path/payment.rs
lightning/src/chain/channelmonitor.rs
lightning/src/chain/onchaintx.rs
lightning/src/chain/package.rs
lightning/src/events/mod.rs
lightning/src/ln/blinded_payment_tests.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/channel.rs
lightning/src/ln/channel_state.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/features.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/max_payment_path_len_tests.rs
lightning/src/ln/msgs.rs
lightning/src/ln/offers_tests.rs
lightning/src/ln/onion_payment.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/onion_utils.rs
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/peer_handler.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/script.rs
lightning/src/offers/invoice.rs
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs
lightning/src/offers/refund.rs
lightning/src/offers/static_invoice.rs
lightning/src/offers/test_utils.rs
lightning/src/onion_message/functional_tests.rs
lightning/src/onion_message/messenger.rs
lightning/src/routing/gossip.rs
lightning/src/routing/router.rs
lightning/src/routing/scoring.rs
lightning/src/routing/test_utils.rs
lightning/src/sign/mod.rs
lightning/src/util/errors.rs
lightning/src/util/test_channel_signer.rs
lightning/src/util/test_utils.rs

index fb5122ec23dd4bc74d424f951001b69f0bc19951..2bebb02333bd99b369a2f33eca281fad7f30a1f5 100644 (file)
@@ -15,7 +15,6 @@ use lightning::blinded_path::payment::{
        PaymentForwardNode, PaymentRelay, ReceiveTlvs,
 };
 use lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA;
-use lightning::ln::features::BlindedHopFeatures;
 use lightning::ln::types::PaymentSecret;
 use lightning::ln::PaymentHash;
 use lightning::offers::invoice::UnsignedBolt12Invoice;
@@ -23,6 +22,7 @@ use lightning::offers::invoice_request::{InvoiceRequest, InvoiceRequestFields};
 use lightning::offers::offer::OfferId;
 use lightning::offers::parse::Bolt12SemanticError;
 use lightning::sign::EntropySource;
+use lightning::types::features::BlindedHopFeatures;
 use lightning::util::ser::Writeable;
 use lightning::util::string::UntrustedString;
 
index cf87467a5ea2de17af14763676af39c1dce190f1..09d1d9b6ba87a338e43fd48d7c7cf50623435f5f 100644 (file)
@@ -9,7 +9,6 @@ use lightning::blinded_path::message::{
        AsyncPaymentsContext, BlindedMessagePath, MessageContext, OffersContext,
 };
 use lightning::blinded_path::EmptyNodeIdLookUp;
-use lightning::ln::features::InitFeatures;
 use lightning::ln::msgs::{self, DecodeError, OnionMessageHandler};
 use lightning::ln::peer_handler::IgnoringMessageHandler;
 use lightning::ln::script::ShutdownScript;
@@ -25,6 +24,7 @@ use lightning::onion_message::messenger::{
 use lightning::onion_message::offers::{OffersMessage, OffersMessageHandler};
 use lightning::onion_message::packet::OnionMessageContents;
 use lightning::sign::{EntropySource, KeyMaterial, NodeSigner, Recipient, SignerProvider};
+use lightning::types::features::InitFeatures;
 use lightning::util::logger::Logger;
 use lightning::util::ser::{Readable, Writeable, Writer};
 use lightning::util::test_channel_signer::TestChannelSigner;
index b60b4f84491b2afe33f91c1481931d8aa24d12fc..148a59fdd8d5e87c37f67b84f0bd39b89fa568bd 100644 (file)
@@ -15,13 +15,13 @@ use lightning::blinded_path::payment::{
        PaymentForwardNode, PaymentRelay, ReceiveTlvs,
 };
 use lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA;
-use lightning::ln::features::BlindedHopFeatures;
 use lightning::ln::types::PaymentSecret;
 use lightning::ln::PaymentHash;
 use lightning::offers::invoice::UnsignedBolt12Invoice;
 use lightning::offers::parse::Bolt12SemanticError;
 use lightning::offers::refund::Refund;
 use lightning::sign::EntropySource;
+use lightning::types::features::BlindedHopFeatures;
 use lightning::util::ser::Writeable;
 
 #[inline]
index df97cbb978a3363c151bdfdd7bbd88d99a1ca8ce..6bf9e300fa2b90778b5e1807f046472ff513f6db 100644 (file)
@@ -17,7 +17,6 @@ use lightning::blinded_path::BlindedHop;
 use lightning::chain::transaction::OutPoint;
 use lightning::ln::channel_state::{ChannelCounterparty, ChannelDetails, ChannelShutdownState};
 use lightning::ln::channelmanager;
-use lightning::ln::features::{BlindedHopFeatures, Bolt12InvoiceFeatures};
 use lightning::ln::msgs;
 use lightning::ln::types::ChannelId;
 use lightning::routing::gossip::{NetworkGraph, RoutingFees};
@@ -28,6 +27,7 @@ use lightning::routing::scoring::{
        ProbabilisticScorer, ProbabilisticScoringDecayParameters, ProbabilisticScoringFeeParameters,
 };
 use lightning::routing::utxo::{UtxoFuture, UtxoLookup, UtxoLookupError, UtxoResult};
+use lightning::types::features::{BlindedHopFeatures, Bolt12InvoiceFeatures};
 use lightning::util::config::UserConfig;
 use lightning::util::hash_tables::*;
 use lightning::util::ser::Readable;
index 318dfcbbd7e9395a3f01e617b57be389ef072804..cea975fb00f6ebebc42d763de646a96065cc5ff3 100644 (file)
@@ -1087,7 +1087,6 @@ mod tests {
        use lightning::ln::channelmanager::{
                ChainParameters, PaymentId, BREAKDOWN_TIMEOUT, MIN_CLTV_EXPIRY_DELTA,
        };
-       use lightning::ln::features::{ChannelFeatures, NodeFeatures};
        use lightning::ln::functional_test_utils::*;
        use lightning::ln::msgs::{ChannelMessageHandler, Init};
        use lightning::ln::peer_handler::{
@@ -1099,6 +1098,7 @@ mod tests {
        use lightning::routing::router::{CandidateRouteHop, DefaultRouter, Path, RouteHop};
        use lightning::routing::scoring::{ChannelUsage, LockableScore, ScoreLookUp, ScoreUpdate};
        use lightning::sign::{ChangeDestinationSource, InMemorySigner, KeysManager};
+       use lightning::types::features::{ChannelFeatures, NodeFeatures};
        use lightning::util::config::UserConfig;
        use lightning::util::persist::{
                KVStore, CHANNEL_MANAGER_PERSISTENCE_KEY, CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE,
index c9758986d43fada7d15453e7b1afe73d94b72ac3..fb0ba191cd35f3dd1d136c374317b0e9760ccb6f 100644 (file)
@@ -21,9 +21,9 @@
 //! # use bitcoin::secp256k1::PublicKey;
 //! # use lightning::io;
 //! # use lightning::ln::msgs::{DecodeError, Init, LightningError};
-//! # use lightning::ln::features::{InitFeatures, NodeFeatures};
 //! use lightning::ln::peer_handler::CustomMessageHandler;
 //! use lightning::ln::wire::{CustomMessageReader, self};
+//! # use lightning::types::features::{InitFeatures, NodeFeatures};
 //! use lightning::util::ser::Writeable;
 //! # use lightning::util::ser::Writer;
 //!
@@ -321,8 +321,8 @@ macro_rules! composite_custom_message_handler {
                                result
                        }
 
-                       fn provided_node_features(&self) -> $crate::lightning::ln::features::NodeFeatures {
-                               $crate::lightning::ln::features::NodeFeatures::empty()
+                       fn provided_node_features(&self) -> $crate::lightning::types::features::NodeFeatures {
+                               $crate::lightning::types::features::NodeFeatures::empty()
                                        $(
                                                | self.$field.provided_node_features()
                                        )*
@@ -330,8 +330,8 @@ macro_rules! composite_custom_message_handler {
 
                        fn provided_init_features(
                                &self, their_node_id: $crate::bitcoin::secp256k1::PublicKey
-                       ) -> $crate::lightning::ln::features::InitFeatures {
-                               $crate::lightning::ln::features::InitFeatures::empty()
+                       ) -> $crate::lightning::types::features::InitFeatures {
+                               $crate::lightning::types::features::InitFeatures::empty()
                                        $(
                                                | self.$field.provided_init_features(their_node_id)
                                        )*
index 89ac7a52ec2d21688617c119ef4588678120efe4..944033102c6753ca635220c12c7f445ad441ebb2 100644 (file)
@@ -624,10 +624,10 @@ mod tests {
        use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
        use bitcoin::Network;
        use lightning::events::*;
-       use lightning::ln::features::*;
        use lightning::ln::msgs::*;
        use lightning::ln::peer_handler::{IgnoringMessageHandler, MessageHandler, PeerManager};
        use lightning::routing::gossip::NodeId;
+       use lightning::types::features::*;
        use lightning::util::test_utils::TestNodeSigner;
 
        use tokio::sync::mpsc;
index b87c1be39d115e73e0727ade8a269cfc2e2c7b1c..c61187fcfff268357a59840942d017ddc58c2979 100644 (file)
@@ -22,7 +22,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
 
 #[cfg(all(not(feature = "std"), not(test)))]
 use alloc::{borrow::ToOwned, vec::Vec};
-use lightning::ln::features::NodeFeatures;
+use lightning::types::features::NodeFeatures;
 
 /// The purpose of this prefix is to identify the serialization format, should other rapid gossip
 /// sync formats arise in the future.
index f741cead26dc256d113b2be6a442a50efa396e7b..69ee5ce4b3b2e6cb2a5891d9221241a9a9d53027 100644 (file)
@@ -18,7 +18,7 @@ use crate::io;
 use crate::io::Cursor;
 use crate::ln::types::PaymentSecret;
 use crate::ln::channel_state::CounterpartyForwardingInfo;
-use crate::ln::features::BlindedHopFeatures;
+use crate::types::features::BlindedHopFeatures;
 use crate::ln::msgs::DecodeError;
 use crate::ln::onion_utils;
 use crate::offers::invoice_request::InvoiceRequestFields;
@@ -633,7 +633,7 @@ mod tests {
        use bitcoin::secp256k1::PublicKey;
        use crate::blinded_path::payment::{PaymentForwardNode, ForwardTlvs, ReceiveTlvs, PaymentConstraints, PaymentContext, PaymentRelay};
        use crate::ln::types::PaymentSecret;
-       use crate::ln::features::BlindedHopFeatures;
+       use crate::types::features::BlindedHopFeatures;
        use crate::ln::functional_test_utils::TEST_FINAL_CLTV;
 
        #[test]
index 86f0d3de5ed226666db6d7185bc11e72675a7663..b0ac1a34c6cc0f48e3e931d8cdbaed61ccab766e 100644 (file)
@@ -5018,7 +5018,7 @@ mod tests {
        use crate::util::logger::Logger;
        use crate::sync::Arc;
        use crate::io;
-       use crate::ln::features::ChannelTypeFeatures;
+       use crate::types::features::ChannelTypeFeatures;
 
        #[allow(unused_imports)]
        use crate::prelude::*;
index 7ac8f9a63f6009ce624e4b400b243ebf7d225cf7..56b34818a9074743174465f703084962d74d9f9c 100644 (file)
@@ -44,7 +44,7 @@ use core::cmp;
 use core::ops::Deref;
 use core::mem::replace;
 use core::mem::swap;
-use crate::ln::features::ChannelTypeFeatures;
+use crate::types::features::ChannelTypeFeatures;
 
 const MAX_ALLOC_SIZE: usize = 64*1024;
 
index 0ff7fd186cd3a4319e4a107085836aadd056199a..1ab124b8ccc6a286dd5ca166af5109447d5ffb80 100644 (file)
@@ -26,7 +26,7 @@ use bitcoin::transaction::Version;
 
 use crate::ln::types::PaymentPreimage;
 use crate::ln::chan_utils::{self, TxCreationKeys, HTLCOutputInCommitment};
-use crate::ln::features::ChannelTypeFeatures;
+use crate::types::features::ChannelTypeFeatures;
 use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
 use crate::ln::msgs::DecodeError;
 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 {
 
        use bitcoin::secp256k1::{PublicKey,SecretKey};
        use bitcoin::secp256k1::Secp256k1;
-       use crate::ln::features::ChannelTypeFeatures;
+       use crate::types::features::ChannelTypeFeatures;
 
        use std::str::FromStr;
 
index 4a179f439853fe129d0d54eafd96eb6f2c87d359..56c7362093cd71bfa6ff7291e1a753c25addd8cf 100644 (file)
@@ -23,7 +23,7 @@ use crate::blinded_path::payment::{Bolt12OfferContext, Bolt12RefundContext, Paym
 use crate::chain::transaction;
 use crate::ln::channelmanager::{InterceptId, PaymentId, RecipientOnionFields};
 use crate::ln::channel::FUNDING_CONF_DEADLINE_BLOCKS;
-use crate::ln::features::ChannelTypeFeatures;
+use crate::types::features::ChannelTypeFeatures;
 use crate::ln::msgs;
 use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
 use crate::offers::invoice::Bolt12Invoice;
index d099e439ae5217956da469e14e99152bc6a496a5..fe2e8060fea763631c2a760e3f55989b088ed1f0 100644 (file)
@@ -17,7 +17,7 @@ use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsP
 use crate::ln::types::{ChannelId, PaymentHash, PaymentSecret};
 use crate::ln::channelmanager;
 use crate::ln::channelmanager::{HTLCFailureMsg, PaymentId, RecipientOnionFields};
-use crate::ln::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};
+use crate::types::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};
 use crate::ln::functional_test_utils::*;
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, UnsignedGossipMessage};
index 0a18b5aac37ad7b7d27a0abbbcc5f07e11368487..7cd58c087713b169b2abaaf9c9cb03695cb723e8 100644 (file)
@@ -45,7 +45,7 @@ use crate::util::transaction_utils::sort_outputs;
 use crate::ln::channel::{INITIAL_COMMITMENT_NUMBER, ANCHOR_OUTPUT_VALUE_SATOSHI};
 use core::ops::Deref;
 use crate::chain;
-use crate::ln::features::ChannelTypeFeatures;
+use crate::types::features::ChannelTypeFeatures;
 use crate::crypto::utils::{sign, sign_with_aux_rand};
 use super::channel_keys::{DelayedPaymentBasepoint, DelayedPaymentKey, HtlcKey, HtlcBasepoint, RevocationKey, RevocationBasepoint};
 
@@ -1903,7 +1903,7 @@ mod tests {
        use bitcoin::hex::FromHex;
        use crate::ln::types::PaymentHash;
        use bitcoin::PublicKey as BitcoinPublicKey;
-       use crate::ln::features::ChannelTypeFeatures;
+       use crate::types::features::ChannelTypeFeatures;
 
        #[allow(unused_imports)]
        use crate::prelude::*;
index 250704ea2a78af5bdbc392cab2e9af712aa7ec86..0122106f6844aa3e16d399ca4eb037bc9725439d 100644 (file)
@@ -26,7 +26,7 @@ use bitcoin::secp256k1::{Secp256k1,ecdsa::Signature};
 use bitcoin::secp256k1;
 
 use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash};
-use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
+use crate::types::features::{ChannelTypeFeatures, InitFeatures};
 use crate::ln::msgs;
 use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
 use crate::ln::script::{self, ShutdownScript};
@@ -9611,7 +9611,7 @@ mod tests {
        use crate::ln::channel::InitFeatures;
        use crate::ln::channel::{AwaitingChannelReadyFlags, Channel, ChannelState, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, HTLCUpdateAwaitingACK, commit_tx_fee_sat};
        use crate::ln::channel::{MAX_FUNDING_SATOSHIS_NO_WUMBO, TOTAL_BITCOIN_SUPPLY_SATOSHIS, MIN_THEIR_CHAN_RESERVE_SATOSHIS};
-       use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
+       use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
        use crate::ln::msgs;
        use crate::ln::msgs::{ChannelUpdate, DecodeError, UnsignedChannelUpdate, MAX_VALUE_MSAT};
        use crate::ln::script::ShutdownScript;
index 6f5ed5afe8242aba73ee3f372a8acd563868f206..36e8687924ccf8a2ffcc785ae20595db39b1bc10 100644 (file)
@@ -17,10 +17,10 @@ use crate::chain::chaininterface::{FeeEstimator, LowerBoundedFeeEstimator};
 use crate::chain::transaction::OutPoint;
 use crate::io;
 use crate::ln::channel::ChannelContext;
-use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
 use crate::ln::msgs::DecodeError;
 use crate::ln::types::{ChannelId, PaymentHash};
 use crate::sign::SignerProvider;
+use crate::types::features::{ChannelTypeFeatures, InitFeatures};
 use crate::util::config::ChannelConfig;
 use crate::util::ser::{Readable, Writeable, Writer};
 
index bdf67b5da7ce901d201d01ad43bbea5aee3f721d..0ffab3bfed0e91138ba3c38de9b76cdeafa237e9 100644 (file)
@@ -50,9 +50,9 @@ use crate::ln::inbound_payment;
 use crate::ln::types::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
 use crate::ln::channel::{self, Channel, ChannelPhase, ChannelContext, ChannelError, ChannelUpdateStatus, ShutdownResult, UnfundedChannelContext, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel, WithChannelContext};
 use crate::ln::channel_state::ChannelDetails;
-use crate::ln::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
+use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
 #[cfg(any(feature = "_test_utils", test))]
-use crate::ln::features::Bolt11InvoiceFeatures;
+use crate::types::features::Bolt11InvoiceFeatures;
 use crate::routing::router::{BlindedTail, InFlightHtlcs, Path, Payee, PaymentParameters, Route, RouteParameters, Router};
 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};
 use crate::ln::msgs;
index e05fb9c41873f43516754dd2ba06cc3a5a9c4ffd..8485ca7e6b08527eaf6250a7b993a300db0f54f9 100644 (file)
@@ -7,21 +7,12 @@
 // You may not use this file except in accordance with one or both of these
 // licenses.
 
-//! Feature flag definitions for the Lightning protocol according to [BOLT #9].
-//!
-//! See [`lightning_types::features`] for the list of features currently supported.
-//!
-//! Note that the use of types via this module is deprecated and will be removed in a future
-//! version. Instead, use feature objects via [`lightning::types::features`].
-//!
-//! [`lightning::types::features`]: crate::types::features
-//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
-
-pub use lightning_types::features::Features;
-pub use lightning_types::features::{InitFeatures, NodeFeatures, ChannelFeatures};
-pub use lightning_types::features::{Bolt11InvoiceFeatures, OfferFeatures, InvoiceRequestFeatures};
-pub use lightning_types::features::{Bolt12InvoiceFeatures, BlindedHopFeatures};
-pub use lightning_types::features::ChannelTypeFeatures;
+//! Implementations of extensions on features.
+
+use lightning_types::features::{InitFeatures, NodeFeatures, ChannelFeatures};
+use lightning_types::features::{Bolt11InvoiceFeatures, OfferFeatures, InvoiceRequestFeatures};
+use lightning_types::features::{Bolt12InvoiceFeatures, BlindedHopFeatures};
+use lightning_types::features::ChannelTypeFeatures;
 
 #[allow(unused_imports)]
 use crate::prelude::*;
index 7776966b2853d454ef3ef524167f41a951110c61..1643be848f9c7d8aee84a4d9384fa62391daf059 100644 (file)
@@ -17,7 +17,7 @@ use crate::events::{ClaimedHTLC, ClosureReason, Event, HTLCDestination, MessageS
 use crate::events::bump_transaction::{BumpTransactionEvent, BumpTransactionEventHandler, Wallet, WalletSource};
 use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
 use crate::ln::channelmanager::{AChannelManager, ChainParameters, ChannelManager, ChannelManagerReadArgs, RAACommitmentOrder, PaymentSendFailure, RecipientOnionFields, PaymentId, MIN_CLTV_EXPIRY_DELTA};
-use crate::ln::features::InitFeatures;
+use crate::types::features::InitFeatures;
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, OnionMessageHandler, RoutingMessageHandler};
 use crate::ln::peer_handler::IgnoringMessageHandler;
index 31346c6b78b72b5e9ad4dfabffd380babc65e119..62885409d9f46ba024b6f9dd83a1e6408576ced9 100644 (file)
@@ -27,7 +27,7 @@ use crate::ln::{chan_utils, onion_utils};
 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};
 use crate::routing::gossip::{NetworkGraph, NetworkUpdate};
 use crate::routing::router::{Path, PaymentParameters, Route, RouteHop, get_route, RouteParameters};
-use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
+use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, RoutingMessageHandler, ErrorAction};
 use crate::util::test_channel_signer::TestChannelSigner;
index 380fe21984b2822ce232f929b151e34815e6c6cb..a6252fd2b1f6250e4f3546872f18fd413b7e931b 100644 (file)
@@ -17,7 +17,7 @@ use crate::events::{Event, MessageSendEventsProvider};
 use crate::ln::PaymentSecret;
 use crate::ln::blinded_payment_tests::get_blinded_route_parameters;
 use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::BlindedHopFeatures;
+use crate::types::features::BlindedHopFeatures;
 use crate::ln::functional_test_utils::*;
 use crate::ln::msgs;
 use crate::ln::msgs::OnionMessageHandler;
index be5ecb27ae010ecd544920826d27054ea20c657d..39c998092f870e7d3a76a39761b35e752c9f6104 100644 (file)
@@ -33,7 +33,7 @@ use bitcoin::hash_types::Txid;
 
 use crate::blinded_path::payment::{BlindedPaymentTlvs, ForwardTlvs, ReceiveTlvs};
 use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
-use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
+use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
 use crate::ln::onion_utils;
 use crate::onion_message;
 use crate::sign::{NodeSigner, Recipient};
@@ -1747,7 +1747,7 @@ mod fuzzy_internal_msgs {
        use bitcoin::secp256k1::PublicKey;
        use crate::blinded_path::payment::{PaymentConstraints, PaymentContext, PaymentRelay};
        use crate::ln::types::{PaymentPreimage, PaymentSecret};
-       use crate::ln::features::BlindedHopFeatures;
+       use crate::types::features::BlindedHopFeatures;
        use super::{FinalOnionHopData, TrampolineOnionPacket};
 
        #[allow(unused_imports)]
@@ -3299,7 +3299,7 @@ mod tests {
        use bitcoin::{Amount, Transaction, TxIn, ScriptBuf, Sequence, Witness, TxOut};
        use bitcoin::hex::DisplayHex;
        use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
-       use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
+       use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
        use crate::ln::msgs::{self, FinalOnionHopData, OnionErrorPacket, CommonOpenChannelFields, CommonAcceptChannelFields, TrampolineOnionPacket};
        use crate::ln::msgs::SocketAddress;
        use crate::routing::gossip::{NodeAlias, NodeId};
index 12b10754e410d168b1676da2c61a36f1fe9a36d8..b667ce2c05da8d382c0ae5320da6f61c6ac476db 100644 (file)
@@ -49,7 +49,7 @@ use crate::blinded_path::payment::{Bolt12OfferContext, Bolt12RefundContext, Paym
 use crate::blinded_path::message::{MessageContext, OffersContext};
 use crate::events::{ClosureReason, Event, MessageSendEventsProvider, PaymentFailureReason, PaymentPurpose};
 use crate::ln::channelmanager::{Bolt12PaymentError, MAX_SHORT_LIVED_RELATIVE_EXPIRY, PaymentId, RecentPaymentDetails, Retry, self};
-use crate::ln::features::Bolt12InvoiceFeatures;
+use crate::types::features::Bolt12InvoiceFeatures;
 use crate::ln::functional_test_utils::*;
 use crate::ln::inbound_payment::ExpandedKey;
 use crate::ln::msgs::{ChannelMessageHandler, Init, NodeAnnouncement, OnionMessage, OnionMessageHandler, RoutingMessageHandler, SocketAddress, UnsignedGossipMessage, UnsignedNodeAnnouncement};
index 3afe5085966952ab85793848b52739ab99f7e950..45783466211eb9992ef00fe6105a7a566bbb1f63 100644 (file)
@@ -13,7 +13,7 @@ use crate::blinded_path::payment::{PaymentConstraints, PaymentRelay};
 use crate::chain::channelmonitor::{HTLC_FAIL_BACK_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS};
 use crate::ln::types::PaymentHash;
 use crate::ln::channelmanager::{BlindedFailure, BlindedForward, CLTV_FAR_FAR_AWAY, HTLCFailureMsg, MIN_CLTV_EXPIRY_DELTA, PendingHTLCInfo, PendingHTLCRouting};
-use crate::ln::features::BlindedHopFeatures;
+use crate::types::features::BlindedHopFeatures;
 use crate::ln::msgs;
 use crate::ln::onion_utils;
 use crate::ln::onion_utils::{HTLCFailReason, INVALID_ONION_BLINDING};
@@ -510,7 +510,7 @@ mod tests {
        use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
        use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
        use crate::ln::channelmanager::RecipientOnionFields;
-       use crate::ln::features::{ChannelFeatures, NodeFeatures};
+       use crate::types::features::{ChannelFeatures, NodeFeatures};
        use crate::ln::msgs;
        use crate::ln::onion_utils::create_payment_onion;
        use crate::routing::router::{Path, RouteHop};
index 081cca2efaeb3da0fc76bff8edb9c2682e268cec..cad01262660af27015df0255d7bf9fbcd8215f32 100644 (file)
@@ -20,7 +20,7 @@ use crate::ln::channelmanager::{HTLCForwardInfo, FailureCode, CLTV_FAR_FAR_AWAY,
 use crate::ln::onion_utils;
 use crate::routing::gossip::{NetworkUpdate, RoutingFees};
 use crate::routing::router::{get_route, PaymentParameters, Route, RouteParameters, RouteHint, RouteHintHop};
-use crate::ln::features::{InitFeatures, Bolt11InvoiceFeatures};
+use crate::types::features::{InitFeatures, Bolt11InvoiceFeatures};
 use crate::ln::functional_test_utils::test_default_channel_config;
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, ChannelUpdate, OutboundTrampolinePayload};
index 5ad68407631dd982aeb233a6cb068e73fbbb218a..33eec9dff0b630ef76a2ac82e17a061a8929a696 100644 (file)
@@ -12,12 +12,12 @@ use crate::crypto::chacha20::ChaCha20;
 use crate::crypto::streams::ChaChaReader;
 use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
 use crate::ln::channelmanager::{HTLCSource, RecipientOnionFields};
-use crate::ln::features::{ChannelFeatures, NodeFeatures};
 use crate::ln::msgs;
 use crate::ln::types::{PaymentHash, PaymentPreimage};
 use crate::routing::gossip::NetworkUpdate;
 use crate::routing::router::{Path, RouteHop, RouteParameters};
 use crate::sign::NodeSigner;
+use crate::types::features::{ChannelFeatures, NodeFeatures};
 use crate::util::errors::{self, APIError};
 use crate::util::logger::Logger;
 use crate::util::ser::{LengthCalculatingWriter, Readable, ReadableArgs, Writeable, Writer};
@@ -1270,10 +1270,10 @@ fn decode_next_hop<T, R: ReadableArgs<T>, N: NextPacketBytes>(
 #[cfg(test)]
 mod tests {
        use crate::io;
-       use crate::ln::features::{ChannelFeatures, NodeFeatures};
        use crate::ln::msgs;
        use crate::ln::types::PaymentHash;
        use crate::routing::router::{Path, Route, RouteHop};
+       use crate::types::features::{ChannelFeatures, NodeFeatures};
        use crate::util::ser::{VecWriter, Writeable, Writer};
 
        #[allow(unused_imports)]
index 2bc1c9b4edc5c4a62e6b4b9ec6bb9271ab452a6f..b592ae0c4f4a36701813bbaa1961cd69d0c56972 100644 (file)
@@ -18,7 +18,7 @@ use crate::events::{self, PaymentFailureReason};
 use crate::ln::types::{PaymentHash, PaymentPreimage, PaymentSecret};
 use crate::ln::channel_state::ChannelDetails;
 use crate::ln::channelmanager::{EventCompletionAction, HTLCSource, PaymentId};
-use crate::ln::features::Bolt12InvoiceFeatures;
+use crate::types::features::Bolt12InvoiceFeatures;
 use crate::ln::onion_utils;
 use crate::ln::onion_utils::{DecodedOnionFailure, HTLCFailReason};
 use crate::offers::invoice::Bolt12Invoice;
@@ -2267,7 +2267,7 @@ mod tests {
        use crate::events::{Event, PathFailure, PaymentFailureReason};
        use crate::ln::types::{PaymentHash, PaymentPreimage};
        use crate::ln::channelmanager::{PaymentId, RecipientOnionFields};
-       use crate::ln::features::{Bolt12InvoiceFeatures, ChannelFeatures, NodeFeatures};
+       use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, NodeFeatures};
        use crate::ln::msgs::{ErrorAction, LightningError};
        use crate::ln::outbound_payment::{Bolt12PaymentError, OutboundPayments, PendingOutboundPayment, Retry, RetryableSendFailure, StaleExpiration};
        #[cfg(feature = "std")]
index eac2a35c6a1bc166bd37d0f7bf99ffd311edec92..2f6a14e8c38db431403aa1755657c182ae807466 100644 (file)
@@ -17,7 +17,7 @@ use crate::sign::EntropySource;
 use crate::events::{ClosureReason, Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentFailureReason, PaymentPurpose};
 use crate::ln::channel::{EXPIRE_PREV_CONFIG_TICKS, get_holder_selected_channel_reserve_satoshis, ANCHOR_OUTPUT_VALUE_SATOSHI};
 use crate::ln::channelmanager::{BREAKDOWN_TIMEOUT, MPP_TIMEOUT_TICKS, MIN_CLTV_EXPIRY_DELTA, PaymentId, PaymentSendFailure, RecentPaymentDetails, RecipientOnionFields, HTLCForwardInfo, PendingHTLCRouting, PendingAddHTLCInfo};
-use crate::ln::features::{Bolt11InvoiceFeatures, ChannelTypeFeatures};
+use crate::types::features::{Bolt11InvoiceFeatures, ChannelTypeFeatures};
 use crate::ln::msgs;
 use crate::ln::types::{ChannelId, PaymentHash, PaymentSecret, PaymentPreimage};
 use crate::ln::chan_utils;
index 64c35835bda534b825a92539da3f6800e7c46a1f..8f88c4f689b7101964d7400ad98fd7412ba25483 100644 (file)
@@ -22,7 +22,7 @@ use crate::blinded_path::message::{AsyncPaymentsContext, DNSResolverContext, Off
 use crate::sign::{NodeSigner, Recipient};
 use crate::events::{MessageSendEvent, MessageSendEventsProvider};
 use crate::ln::types::ChannelId;
-use crate::ln::features::{InitFeatures, NodeFeatures};
+use crate::types::features::{InitFeatures, NodeFeatures};
 use crate::ln::msgs;
 use crate::ln::msgs::{ChannelMessageHandler, Init, LightningError, SocketAddress, OnionMessageHandler, RoutingMessageHandler};
 use crate::util::ser::{VecWriter, Writeable, Writer};
@@ -2712,7 +2712,7 @@ mod tests {
        use crate::events;
        use crate::io;
        use crate::ln::types::ChannelId;
-       use crate::ln::features::{InitFeatures, NodeFeatures};
+       use crate::types::features::{InitFeatures, NodeFeatures};
        use crate::ln::peer_channel_encryptor::PeerChannelEncryptor;
        use crate::ln::peer_handler::{CustomMessageHandler, PeerManager, MessageHandler, SocketDescriptor, IgnoringMessageHandler, filter_addresses, ErroringMessageHandler, MAX_BUFFER_DRAIN_TICK_INTERVALS_PER_PEER};
        use crate::ln::{msgs, wire};
index 22854952c58fcc4ba1c4316ce4ef04e5a5390729..beccf59af4edb4ab0169a36499a6bf2974c28668 100644 (file)
@@ -17,7 +17,7 @@ use crate::events::{ClosureReason, Event, HTLCDestination, MessageSendEvent, Mes
 use crate::ln::channelmanager::{MIN_CLTV_EXPIRY_DELTA, PaymentId, RecipientOnionFields};
 use crate::routing::gossip::RoutingFees;
 use crate::routing::router::{PaymentParameters, RouteHint, RouteHintHop};
-use crate::ln::features::ChannelTypeFeatures;
+use crate::types::features::ChannelTypeFeatures;
 use crate::ln::msgs;
 use crate::ln::types::ChannelId;
 use crate::ln::msgs::{ChannelMessageHandler, RoutingMessageHandler, ChannelUpdate, ErrorAction};
index 0c33a1498edc886ffa370f18e54091457825df7a..518128b6657f4f012355194a6badc3d65eb7c1c4 100644 (file)
@@ -7,7 +7,7 @@ use bitcoin::hashes::Hash;
 use bitcoin::secp256k1::PublicKey;
 
 use crate::ln::channelmanager;
-use crate::ln::features::InitFeatures;
+use crate::types::features::InitFeatures;
 use crate::ln::msgs::DecodeError;
 use crate::util::ser::{Readable, Writeable, Writer};
 
@@ -175,7 +175,7 @@ mod shutdown_script_tests {
        use bitcoin::secp256k1::Secp256k1;
        use bitcoin::secp256k1::{PublicKey, SecretKey};
 
-       use crate::ln::features::InitFeatures;
+       use crate::types::features::InitFeatures;
        use crate::prelude::*;
 
        fn pubkey() -> bitcoin::key::PublicKey {
index 648c0fba65149dcaa7c3a1d03a88da7aeb223d05..d1fa54b8f191ac589ed48236737e54fef7bc1638 100644 (file)
@@ -115,7 +115,7 @@ use crate::blinded_path::message::BlindedMessagePath;
 use crate::blinded_path::payment::{BlindedPayInfo, BlindedPaymentPath};
 use crate::ln::types::PaymentHash;
 use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::{Bolt12InvoiceFeatures, InvoiceRequestFeatures, OfferFeatures};
+use crate::types::features::{Bolt12InvoiceFeatures, InvoiceRequestFeatures, OfferFeatures};
 use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
 use crate::ln::msgs::DecodeError;
 use crate::offers::invoice_macros::{invoice_accessors_common, invoice_builder_methods_common};
@@ -1453,7 +1453,7 @@ mod tests {
        use crate::blinded_path::BlindedHop;
        use crate::blinded_path::message::BlindedMessagePath;
        use crate::sign::KeyMaterial;
-       use crate::ln::features::{Bolt12InvoiceFeatures, InvoiceRequestFeatures, OfferFeatures};
+       use crate::types::features::{Bolt12InvoiceFeatures, InvoiceRequestFeatures, OfferFeatures};
        use crate::ln::inbound_payment::ExpandedKey;
        use crate::ln::msgs::DecodeError;
        use crate::offers::invoice_request::InvoiceRequestTlvStreamRef;
index c6c9da82a4eb19d5974e5929cdef9721bbee33f9..3fcc50b5e30d4bbcbb1f68641f724fceae7aa936 100644 (file)
@@ -25,7 +25,7 @@
 //!
 //! use bitcoin::network::Network;
 //! use bitcoin::secp256k1::{Keypair, PublicKey, Secp256k1, SecretKey};
-//! use lightning::ln::features::OfferFeatures;
+//! use lightning::types::features::OfferFeatures;
 //! use lightning::offers::invoice_request::UnsignedInvoiceRequest;
 //! use lightning::offers::offer::Offer;
 //! use lightning::util::ser::Writeable;
@@ -66,7 +66,7 @@ use crate::blinded_path::message::BlindedMessagePath;
 use crate::blinded_path::payment::BlindedPaymentPath;
 use crate::ln::types::PaymentHash;
 use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::InvoiceRequestFeatures;
+use crate::types::features::InvoiceRequestFeatures;
 use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
 use crate::ln::msgs::DecodeError;
 use crate::offers::merkle::{SignError, SignFn, SignatureTlvStream, SignatureTlvStreamRef, TaggedHash, self};
@@ -1252,7 +1252,7 @@ mod tests {
        use core::time::Duration;
        use crate::sign::KeyMaterial;
        use crate::ln::channelmanager::PaymentId;
-       use crate::ln::features::{InvoiceRequestFeatures, OfferFeatures};
+       use crate::types::features::{InvoiceRequestFeatures, OfferFeatures};
        use crate::ln::inbound_payment::ExpandedKey;
        use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
        use crate::offers::invoice::{Bolt12Invoice, SIGNATURE_TAG as INVOICE_SIGNATURE_TAG};
index 8501b8d4651f503a4f16ab307e2d33c763652090..6580430fb4f8fd5d7f402a73ce40989217c8d2ae 100644 (file)
@@ -87,7 +87,7 @@ use core::time::Duration;
 use crate::io;
 use crate::blinded_path::message::BlindedMessagePath;
 use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::OfferFeatures;
+use crate::types::features::OfferFeatures;
 use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
 use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
 use crate::offers::merkle::{TaggedHash, TlvStream};
@@ -603,7 +603,7 @@ macro_rules! offer_accessors { ($self: ident, $contents: expr) => {
        }
 
        /// Features pertaining to the offer.
-       pub fn offer_features(&$self) -> &$crate::ln::features::OfferFeatures {
+       pub fn offer_features(&$self) -> &$crate::types::features::OfferFeatures {
                &$contents.features()
        }
 
@@ -1191,7 +1191,7 @@ mod tests {
        use crate::blinded_path::BlindedHop;
        use crate::blinded_path::message::BlindedMessagePath;
        use crate::sign::KeyMaterial;
-       use crate::ln::features::OfferFeatures;
+       use crate::types::features::OfferFeatures;
        use crate::ln::inbound_payment::ExpandedKey;
        use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
        use crate::offers::nonce::Nonce;
index 482c3b6884c4c922370f8bea5424e6d0403bf70a..8c580bdcc6e3f11dd0824f18e7ad0f08249e459e 100644 (file)
@@ -95,7 +95,7 @@ use crate::blinded_path::message::BlindedMessagePath;
 use crate::blinded_path::payment::BlindedPaymentPath;
 use crate::ln::types::PaymentHash;
 use crate::ln::channelmanager::PaymentId;
-use crate::ln::features::InvoiceRequestFeatures;
+use crate::types::features::InvoiceRequestFeatures;
 use crate::ln::inbound_payment::{ExpandedKey, IV_LEN};
 use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
 use crate::offers::invoice_request::{InvoiceRequestTlvStream, InvoiceRequestTlvStreamRef};
@@ -941,7 +941,7 @@ mod tests {
        use crate::blinded_path::message::BlindedMessagePath;
        use crate::sign::KeyMaterial;
        use crate::ln::channelmanager::PaymentId;
-       use crate::ln::features::{InvoiceRequestFeatures, OfferFeatures};
+       use crate::types::features::{InvoiceRequestFeatures, OfferFeatures};
        use crate::ln::inbound_payment::ExpandedKey;
        use crate::ln::msgs::{DecodeError, MAX_VALUE_MSAT};
        use crate::offers::invoice_request::InvoiceRequestTlvStreamRef;
index bf88bd9446cc6d3b45956363508e9f123b8dcc9c..107e9c6989282879598904d80a132ddeb1bec9d3 100644 (file)
@@ -12,7 +12,6 @@
 use crate::blinded_path::message::BlindedMessagePath;
 use crate::blinded_path::payment::BlindedPaymentPath;
 use crate::io;
-use crate::ln::features::{Bolt12InvoiceFeatures, OfferFeatures};
 use crate::ln::inbound_payment::ExpandedKey;
 use crate::ln::msgs::DecodeError;
 use crate::offers::invoice::{
@@ -29,6 +28,7 @@ use crate::offers::offer::{
        Amount, Offer, OfferContents, OfferTlvStream, OfferTlvStreamRef, Quantity, OFFER_TYPES,
 };
 use crate::offers::parse::{Bolt12ParseError, Bolt12SemanticError, ParsedMessage};
+use crate::types::features::{Bolt12InvoiceFeatures, OfferFeatures};
 use crate::util::ser::{CursorReadable, Iterable, WithoutLength, Writeable, Writer};
 use crate::util::string::PrintableString;
 use bitcoin::address::Address;
@@ -603,7 +603,6 @@ impl TryFrom<PartialInvoiceTlvStream> for InvoiceContents {
 mod tests {
        use crate::blinded_path::message::BlindedMessagePath;
        use crate::blinded_path::BlindedHop;
-       use crate::ln::features::{Bolt12InvoiceFeatures, OfferFeatures};
        use crate::ln::inbound_payment::ExpandedKey;
        use crate::ln::msgs::DecodeError;
        use crate::offers::invoice::InvoiceTlvStreamRef;
@@ -617,6 +616,7 @@ mod tests {
        };
        use crate::offers::test_utils::*;
        use crate::sign::KeyMaterial;
+       use crate::types::features::{Bolt12InvoiceFeatures, OfferFeatures};
        use crate::util::ser::{BigSize, Iterable, Writeable};
        use bitcoin::constants::ChainHash;
        use bitcoin::secp256k1::{self, Secp256k1};
index 735354cb896bf6532704d7ed8069357c7d276ca2..fc6d9f755a0c0f8ec0b38f0381758c8b2d74adf1 100644 (file)
@@ -17,7 +17,7 @@ use crate::blinded_path::BlindedHop;
 use crate::blinded_path::payment::{BlindedPayInfo, BlindedPaymentPath};
 use crate::sign::EntropySource;
 use crate::ln::types::PaymentHash;
-use crate::ln::features::BlindedHopFeatures;
+use crate::types::features::BlindedHopFeatures;
 use crate::offers::merkle::TaggedHash;
 
 #[allow(unused_imports)]
index ac79c88fb00a10dc3c7b4ed6e746e4c837556643..23fd30c9ec8c747a108d0e3615397b3378d923b1 100644 (file)
@@ -12,7 +12,7 @@
 use crate::blinded_path::EmptyNodeIdLookUp;
 use crate::blinded_path::message::{AsyncPaymentsContext, BlindedMessagePath, DNSResolverContext, MessageForwardNode, MessageContext, OffersContext};
 use crate::events::{Event, EventsProvider};
-use crate::ln::features::{ChannelFeatures, InitFeatures};
+use crate::types::features::{ChannelFeatures, InitFeatures};
 use crate::ln::msgs::{self, DecodeError, OnionMessageHandler};
 use crate::routing::gossip::{NetworkGraph, P2PGossipSync};
 use crate::routing::test_utils::{add_channel, add_or_update_node};
index 0d7243193a35ca550b4b012c33cfcfd256070163..8162c55ac0807d2f6b0fba410811bc5cb767e575 100644 (file)
@@ -20,7 +20,7 @@ use crate::blinded_path::message::{BlindedMessagePath, MessageForwardNode, Forwa
 use crate::blinded_path::utils;
 use crate::events::{Event, EventHandler, EventsProvider, ReplayEvent};
 use crate::sign::{EntropySource, NodeSigner, Recipient};
-use crate::ln::features::{InitFeatures, NodeFeatures};
+use crate::types::features::{InitFeatures, NodeFeatures};
 use crate::ln::msgs::{self, OnionMessage, OnionMessageHandler, SocketAddress};
 use crate::ln::onion_utils;
 use crate::routing::gossip::{NetworkGraph, NodeId, ReadOnlyNetworkGraph};
index 47d80d86cf7272aff98594903f59b4478f64defd..474bedfc24ed46c9e9a39d05739864be8f0ede62 100644 (file)
@@ -22,7 +22,6 @@ use bitcoin::hashes::Hash;
 use bitcoin::network::Network;
 
 use crate::events::{MessageSendEvent, MessageSendEventsProvider};
-use crate::ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
 use crate::ln::msgs;
 use crate::ln::msgs::{
        ChannelAnnouncement, ChannelUpdate, GossipTimestampFilter, NodeAnnouncement,
@@ -36,6 +35,7 @@ use crate::ln::msgs::{
 };
 use crate::ln::types::ChannelId;
 use crate::routing::utxo::{self, UtxoLookup, UtxoResolver};
+use crate::types::features::{ChannelFeatures, InitFeatures, NodeFeatures};
 use crate::util::indexed_map::{Entry as IndexedMapEntry, IndexedMap};
 use crate::util::logger::{Level, Logger};
 use crate::util::scid_utils::{block_from_scid, scid_from_parts, MAX_SCID_BLOCK};
@@ -2683,8 +2683,6 @@ pub(crate) mod tests {
        use crate::events::{MessageSendEvent, MessageSendEventsProvider};
        use crate::ln::chan_utils::make_funding_redeemscript;
        use crate::ln::channelmanager;
-       #[cfg(feature = "std")]
-       use crate::ln::features::InitFeatures;
        use crate::ln::msgs::SocketAddress;
        use crate::ln::msgs::{
                ChannelAnnouncement, ChannelUpdate, NodeAnnouncement, QueryChannelRange,
@@ -2698,6 +2696,8 @@ pub(crate) mod tests {
                MAX_EXCESS_BYTES_FOR_RELAY,
        };
        use crate::routing::utxo::{UtxoLookupError, UtxoResult};
+       #[cfg(feature = "std")]
+       use crate::types::features::InitFeatures;
        use crate::util::config::UserConfig;
        use crate::util::scid_utils::scid_from_parts;
        use crate::util::ser::{Hostname, Readable, ReadableArgs, Writeable};
index b0a3f34a6761a59320e23689dde91766ed348c7d..9bdacab4be038385e665374b7a6f32cb0f7be64d 100644 (file)
@@ -16,7 +16,7 @@ use crate::blinded_path::payment::{BlindedPaymentPath, ForwardTlvs, PaymentConst
 use crate::ln::{PaymentHash, PaymentPreimage};
 use crate::ln::channel_state::ChannelDetails;
 use crate::ln::channelmanager::{PaymentId, MIN_FINAL_CLTV_EXPIRY_DELTA, RecipientOnionFields};
-use crate::ln::features::{BlindedHopFeatures, Bolt11InvoiceFeatures, Bolt12InvoiceFeatures, ChannelFeatures, NodeFeatures};
+use crate::types::features::{BlindedHopFeatures, Bolt11InvoiceFeatures, Bolt12InvoiceFeatures, ChannelFeatures, NodeFeatures};
 use crate::ln::msgs::{DecodeError, ErrorAction, LightningError, MAX_VALUE_MSAT};
 use crate::ln::onion_utils;
 #[cfg(async_payments)]
@@ -3548,7 +3548,7 @@ mod tests {
        use crate::chain::transaction::OutPoint;
        use crate::ln::channel_state::{ChannelCounterparty, ChannelDetails, ChannelShutdownState};
        use crate::ln::types::ChannelId;
-       use crate::ln::features::{BlindedHopFeatures, ChannelFeatures, InitFeatures, NodeFeatures};
+       use crate::types::features::{BlindedHopFeatures, ChannelFeatures, InitFeatures, NodeFeatures};
        use crate::ln::msgs::{ErrorAction, LightningError, UnsignedChannelUpdate, MAX_VALUE_MSAT};
        use crate::ln::channelmanager;
        use crate::util::config::UserConfig;
@@ -8840,7 +8840,7 @@ pub mod benches {
        use super::*;
        use crate::routing::scoring::{ScoreUpdate, ScoreLookUp};
        use crate::ln::channelmanager;
-       use crate::ln::features::Bolt11InvoiceFeatures;
+       use crate::types::features::Bolt11InvoiceFeatures;
        use crate::routing::gossip::NetworkGraph;
        use crate::routing::scoring::{FixedPenaltyScorer, ProbabilisticScoringFeeParameters};
        use crate::util::config::UserConfig;
index b27a9f97b02664507a7369e8d18b3245d18e0eb2..d155926cb64b33b85ac459d6621a044ecbe7f20d 100644 (file)
@@ -3481,7 +3481,7 @@ pub mod benches {
        use criterion::Criterion;
        use crate::routing::router::{bench_utils, RouteHop};
        use crate::util::test_utils::TestLogger;
-       use crate::ln::features::{ChannelFeatures, NodeFeatures};
+       use crate::types::features::{ChannelFeatures, NodeFeatures};
 
        pub fn decay_100k_channel_bounds(bench: &mut Criterion) {
                let logger = TestLogger::new();
index a64955cd0156b5bd2d0a6ff64738438a1663bb7f..f5b752f1ad4823a9bea2333a5dace1e4d5a5c308 100644 (file)
@@ -8,7 +8,7 @@
 // licenses.
 
 use crate::routing::gossip::{NetworkGraph, NodeAlias, P2PGossipSync};
-use crate::ln::features::{ChannelFeatures, NodeFeatures};
+use crate::types::features::{ChannelFeatures, NodeFeatures};
 use crate::ln::msgs::{ChannelAnnouncement, ChannelUpdate, MAX_VALUE_MSAT, NodeAnnouncement, RoutingMessageHandler, SocketAddress, UnsignedChannelAnnouncement, UnsignedChannelUpdate, UnsignedNodeAnnouncement};
 use crate::util::test_utils;
 use crate::util::ser::Writeable;
index 8ad34f2d653de9481c170ec3e709dd121a61315b..c1a70e5e8d076199b8c7139f4cd6862017d5701f 100644 (file)
@@ -63,12 +63,12 @@ use crate::util::transaction_utils;
 
 use crate::crypto::chacha20::ChaCha20;
 use crate::io::{self, Error};
-use crate::ln::features::ChannelTypeFeatures;
 use crate::ln::msgs::DecodeError;
 use crate::prelude::*;
 use crate::sign::ecdsa::EcdsaChannelSigner;
 #[cfg(taproot)]
 use crate::sign::taproot::TaprootChannelSigner;
+use crate::types::features::ChannelTypeFeatures;
 use crate::util::atomic_counter::AtomicCounter;
 use core::convert::TryInto;
 use core::ops::Deref;
index ba423aa1c96992fbdbf5b2bee8538cc778a2a61d..7b9a24f891f5e91ef43293c24b8cacd608b830fc 100644 (file)
@@ -64,7 +64,7 @@ pub enum APIError {
        /// a channel or cooperatively close one with this peer (and will have to force-close instead).
        ///
        /// [`SignerProvider::get_shutdown_scriptpubkey`]: crate::sign::SignerProvider::get_shutdown_scriptpubkey
-       /// [`InitFeatures`]: crate::ln::features::InitFeatures
+       /// [`InitFeatures`]: crate::types::features::InitFeatures
        IncompatibleShutdownScript {
                /// The incompatible shutdown script.
                script: ShutdownScript,
index 9aa34fd4ca601fb4cbee58032f2d0bcdbfc3a393..9a1a75e92cb8105622466739156510a75b798208 100644 (file)
@@ -37,7 +37,7 @@ use musig2::types::{PartialSignature, PublicNonce};
 use crate::sign::HTLCDescriptor;
 use crate::util::ser::{Writeable, Writer};
 use crate::io::Error;
-use crate::ln::features::ChannelTypeFeatures;
+use crate::types::features::ChannelTypeFeatures;
 #[cfg(taproot)]
 use crate::ln::msgs::PartialSignatureWithNonce;
 #[cfg(taproot)]
index 12e027d32fca0b4e6b457e650b5ce4549b6445a9..4583bc2e48e6f636ecf31ab858553c81f3d7cd63 100644 (file)
@@ -29,7 +29,7 @@ use crate::ln::channel_state::ChannelDetails;
 use crate::ln::channelmanager;
 #[cfg(test)]
 use crate::ln::chan_utils::CommitmentTransaction;
-use crate::ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
+use crate::types::features::{ChannelFeatures, InitFeatures, NodeFeatures};
 use crate::ln::{msgs, wire};
 use crate::ln::msgs::LightningError;
 use crate::ln::script::ShutdownScript;