Skip to content

Commit 608209e

Browse files
authored
Merge pull request #3359 from TheBlueMatt/2024-10-less-types-re-export
Remove deprecated re-exports
2 parents c5be7aa + b5b3860 commit 608209e

Some content is hidden

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

61 files changed

+159
-165
lines changed

fuzz/src/chanmon_consistency.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ use lightning::ln::msgs::{
5555
self, ChannelMessageHandler, CommitmentUpdate, DecodeError, Init, UpdateAddHTLC,
5656
};
5757
use lightning::ln::script::ShutdownScript;
58-
use lightning::ln::types::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
58+
use lightning::ln::types::ChannelId;
5959
use lightning::offers::invoice::UnsignedBolt12Invoice;
6060
use lightning::offers::invoice_request::UnsignedInvoiceRequest;
6161
use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath};
6262
use lightning::routing::router::{InFlightHtlcs, Path, Route, RouteHop, RouteParameters, Router};
6363
use lightning::sign::{
6464
EntropySource, InMemorySigner, KeyMaterial, NodeSigner, Recipient, SignerProvider,
6565
};
66+
use lightning::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
6667
use lightning::util::config::UserConfig;
6768
use lightning::util::errors::APIError;
6869
use lightning::util::hash_tables::*;

fuzz/src/full_stack.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use lightning::ln::peer_handler::{
4848
IgnoringMessageHandler, MessageHandler, PeerManager, SocketDescriptor,
4949
};
5050
use lightning::ln::script::ShutdownScript;
51-
use lightning::ln::types::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
51+
use lightning::ln::types::ChannelId;
5252
use lightning::offers::invoice::UnsignedBolt12Invoice;
5353
use lightning::offers::invoice_request::UnsignedInvoiceRequest;
5454
use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath};
@@ -60,6 +60,7 @@ use lightning::routing::utxo::UtxoLookup;
6060
use lightning::sign::{
6161
EntropySource, InMemorySigner, KeyMaterial, NodeSigner, Recipient, SignerProvider,
6262
};
63+
use lightning::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
6364
use lightning::util::config::{ChannelConfig, UserConfig};
6465
use lightning::util::errors::APIError;
6566
use lightning::util::hash_tables::*;

fuzz/src/invoice_request_deser.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ use lightning::blinded_path::payment::{
1515
PaymentForwardNode, PaymentRelay, ReceiveTlvs,
1616
};
1717
use lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA;
18-
use lightning::ln::features::BlindedHopFeatures;
19-
use lightning::ln::types::PaymentSecret;
20-
use lightning::ln::PaymentHash;
2118
use lightning::offers::invoice::UnsignedBolt12Invoice;
2219
use lightning::offers::invoice_request::{InvoiceRequest, InvoiceRequestFields};
2320
use lightning::offers::offer::OfferId;
2421
use lightning::offers::parse::Bolt12SemanticError;
2522
use lightning::sign::EntropySource;
23+
use lightning::types::features::BlindedHopFeatures;
24+
use lightning::types::payment::{PaymentHash, PaymentSecret};
2625
use lightning::util::ser::Writeable;
2726
use lightning::util::string::UntrustedString;
2827

fuzz/src/onion_message.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use lightning::blinded_path::message::{
99
AsyncPaymentsContext, BlindedMessagePath, MessageContext, OffersContext,
1010
};
1111
use lightning::blinded_path::EmptyNodeIdLookUp;
12-
use lightning::ln::features::InitFeatures;
1312
use lightning::ln::msgs::{self, DecodeError, OnionMessageHandler};
1413
use lightning::ln::peer_handler::IgnoringMessageHandler;
1514
use lightning::ln::script::ShutdownScript;
@@ -25,6 +24,7 @@ use lightning::onion_message::messenger::{
2524
use lightning::onion_message::offers::{OffersMessage, OffersMessageHandler};
2625
use lightning::onion_message::packet::OnionMessageContents;
2726
use lightning::sign::{EntropySource, KeyMaterial, NodeSigner, Recipient, SignerProvider};
27+
use lightning::types::features::InitFeatures;
2828
use lightning::util::logger::Logger;
2929
use lightning::util::ser::{Readable, Writeable, Writer};
3030
use lightning::util::test_channel_signer::TestChannelSigner;

fuzz/src/refund_deser.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ use lightning::blinded_path::payment::{
1515
PaymentForwardNode, PaymentRelay, ReceiveTlvs,
1616
};
1717
use lightning::ln::channelmanager::MIN_FINAL_CLTV_EXPIRY_DELTA;
18-
use lightning::ln::features::BlindedHopFeatures;
19-
use lightning::ln::types::PaymentSecret;
20-
use lightning::ln::PaymentHash;
2118
use lightning::offers::invoice::UnsignedBolt12Invoice;
2219
use lightning::offers::parse::Bolt12SemanticError;
2320
use lightning::offers::refund::Refund;
2421
use lightning::sign::EntropySource;
22+
use lightning::types::features::BlindedHopFeatures;
23+
use lightning::types::payment::{PaymentHash, PaymentSecret};
2524
use lightning::util::ser::Writeable;
2625

2726
#[inline]

fuzz/src/router.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use lightning::blinded_path::BlindedHop;
1717
use lightning::chain::transaction::OutPoint;
1818
use lightning::ln::channel_state::{ChannelCounterparty, ChannelDetails, ChannelShutdownState};
1919
use lightning::ln::channelmanager;
20-
use lightning::ln::features::{BlindedHopFeatures, Bolt12InvoiceFeatures};
2120
use lightning::ln::msgs;
2221
use lightning::ln::types::ChannelId;
2322
use lightning::routing::gossip::{NetworkGraph, RoutingFees};
@@ -28,6 +27,7 @@ use lightning::routing::scoring::{
2827
ProbabilisticScorer, ProbabilisticScoringDecayParameters, ProbabilisticScoringFeeParameters,
2928
};
3029
use lightning::routing::utxo::{UtxoFuture, UtxoLookup, UtxoLookupError, UtxoResult};
30+
use lightning::types::features::{BlindedHopFeatures, Bolt12InvoiceFeatures};
3131
use lightning::util::config::UserConfig;
3232
use lightning::util::hash_tables::*;
3333
use lightning::util::ser::Readable;

lightning-background-processor/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1077,18 +1077,19 @@ mod tests {
10771077
use lightning::ln::channelmanager::{
10781078
ChainParameters, PaymentId, BREAKDOWN_TIMEOUT, MIN_CLTV_EXPIRY_DELTA,
10791079
};
1080-
use lightning::ln::features::{ChannelFeatures, NodeFeatures};
10811080
use lightning::ln::functional_test_utils::*;
10821081
use lightning::ln::msgs::{ChannelMessageHandler, Init};
10831082
use lightning::ln::peer_handler::{
10841083
IgnoringMessageHandler, MessageHandler, PeerManager, SocketDescriptor,
10851084
};
1086-
use lightning::ln::types::{ChannelId, PaymentHash};
1085+
use lightning::ln::types::ChannelId;
10871086
use lightning::onion_message::messenger::{DefaultMessageRouter, OnionMessenger};
10881087
use lightning::routing::gossip::{NetworkGraph, P2PGossipSync};
10891088
use lightning::routing::router::{CandidateRouteHop, DefaultRouter, Path, RouteHop};
10901089
use lightning::routing::scoring::{ChannelUsage, LockableScore, ScoreLookUp, ScoreUpdate};
10911090
use lightning::sign::{ChangeDestinationSource, InMemorySigner, KeysManager};
1091+
use lightning::types::features::{ChannelFeatures, NodeFeatures};
1092+
use lightning::types::payment::PaymentHash;
10921093
use lightning::util::config::UserConfig;
10931094
use lightning::util::persist::{
10941095
KVStore, CHANNEL_MANAGER_PERSISTENCE_KEY, CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE,

lightning-custom-message/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
//! # use bitcoin::secp256k1::PublicKey;
2222
//! # use lightning::io;
2323
//! # use lightning::ln::msgs::{DecodeError, Init, LightningError};
24-
//! # use lightning::ln::features::{InitFeatures, NodeFeatures};
2524
//! use lightning::ln::peer_handler::CustomMessageHandler;
2625
//! use lightning::ln::wire::{CustomMessageReader, self};
26+
//! # use lightning::types::features::{InitFeatures, NodeFeatures};
2727
//! use lightning::util::ser::Writeable;
2828
//! # use lightning::util::ser::Writer;
2929
//!
@@ -321,17 +321,17 @@ macro_rules! composite_custom_message_handler {
321321
result
322322
}
323323

324-
fn provided_node_features(&self) -> $crate::lightning::ln::features::NodeFeatures {
325-
$crate::lightning::ln::features::NodeFeatures::empty()
324+
fn provided_node_features(&self) -> $crate::lightning::types::features::NodeFeatures {
325+
$crate::lightning::types::features::NodeFeatures::empty()
326326
$(
327327
| self.$field.provided_node_features()
328328
)*
329329
}
330330

331331
fn provided_init_features(
332332
&self, their_node_id: $crate::bitcoin::secp256k1::PublicKey
333-
) -> $crate::lightning::ln::features::InitFeatures {
334-
$crate::lightning::ln::features::InitFeatures::empty()
333+
) -> $crate::lightning::types::features::InitFeatures {
334+
$crate::lightning::types::features::InitFeatures::empty()
335335
$(
336336
| self.$field.provided_init_features(their_node_id)
337337
)*

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/message.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use crate::io;
2222
use crate::io::Cursor;
2323
use crate::ln::channelmanager::PaymentId;
2424
use crate::ln::msgs::DecodeError;
25-
use crate::ln::{PaymentHash, onion_utils};
25+
use crate::ln::onion_utils;
26+
use crate::types::payment::PaymentHash;
2627
use crate::offers::nonce::Nonce;
2728
use crate::onion_message::packet::ControlTlvs;
2829
use crate::routing::gossip::{NodeId, ReadOnlyNetworkGraph};

lightning/src/blinded_path/payment.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ use crate::blinded_path::utils;
1616
use crate::crypto::streams::ChaChaPolyReadAdapter;
1717
use crate::io;
1818
use crate::io::Cursor;
19-
use crate::ln::types::PaymentSecret;
19+
use crate::types::payment::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;
@@ -632,8 +632,8 @@ impl_writeable_tlv_based!(Bolt12RefundContext, {});
632632
mod tests {
633633
use bitcoin::secp256k1::PublicKey;
634634
use crate::blinded_path::payment::{PaymentForwardNode, ForwardTlvs, ReceiveTlvs, PaymentConstraints, PaymentContext, PaymentRelay};
635-
use crate::ln::types::PaymentSecret;
636-
use crate::ln::features::BlindedHopFeatures;
635+
use crate::types::payment::PaymentSecret;
636+
use crate::types::features::BlindedHopFeatures;
637637
use crate::ln::functional_test_utils::TEST_FINAL_CLTV;
638638

639639
#[test]

lightning/src/chain/channelmonitor.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ use bitcoin::ecdsa::Signature as BitcoinSignature;
3333
use bitcoin::secp256k1::{self, SecretKey, PublicKey, Secp256k1, ecdsa::Signature};
3434

3535
use crate::ln::channel::INITIAL_COMMITMENT_NUMBER;
36-
use crate::ln::types::{PaymentHash, PaymentPreimage, ChannelId};
36+
use crate::ln::types::ChannelId;
37+
use crate::types::payment::{PaymentHash, PaymentPreimage};
3738
use crate::ln::msgs::DecodeError;
3839
use crate::ln::channel_keys::{DelayedPaymentKey, DelayedPaymentBasepoint, HtlcBasepoint, HtlcKey, RevocationKey, RevocationBasepoint};
3940
use crate::ln::chan_utils::{self,CommitmentTransaction, CounterpartyCommitmentSecrets, HTLCOutputInCommitment, HTLCClaim, ChannelTransactionParameters, HolderCommitmentTransaction, TxCreationKeys};
@@ -5015,7 +5016,8 @@ mod tests {
50155016
use crate::chain::package::{weight_offered_htlc, weight_received_htlc, weight_revoked_offered_htlc, weight_revoked_received_htlc, WEIGHT_REVOKED_OUTPUT};
50165017
use crate::chain::transaction::OutPoint;
50175018
use crate::sign::InMemorySigner;
5018-
use crate::ln::types::{PaymentPreimage, PaymentHash, ChannelId};
5019+
use crate::ln::types::ChannelId;
5020+
use crate::types::payment::{PaymentPreimage, PaymentHash};
50195021
use crate::ln::channel_keys::{DelayedPaymentBasepoint, DelayedPaymentKey, HtlcBasepoint, RevocationBasepoint, RevocationKey};
50205022
use crate::ln::chan_utils::{self,HTLCOutputInCommitment, ChannelPublicKeys, ChannelTransactionParameters, HolderCommitmentTransaction, CounterpartyChannelTransactionParameters};
50215023
use crate::ln::channelmanager::{PaymentSendFailure, PaymentId, RecipientOnionFields};
@@ -5027,7 +5029,7 @@ mod tests {
50275029
use crate::util::logger::Logger;
50285030
use crate::sync::Arc;
50295031
use crate::io;
5030-
use crate::ln::features::ChannelTypeFeatures;
5032+
use crate::types::features::ChannelTypeFeatures;
50315033

50325034
#[allow(unused_imports)]
50335035
use crate::prelude::*;

lightning/src/chain/onchaintx.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use bitcoin::secp256k1;
2727
use crate::chain::chaininterface::{ConfirmationTarget, compute_feerate_sat_per_1000_weight};
2828
use crate::sign::{ChannelDerivationParameters, HTLCDescriptor, ChannelSigner, EntropySource, SignerProvider, ecdsa::EcdsaChannelSigner};
2929
use crate::ln::msgs::DecodeError;
30-
use crate::ln::types::PaymentPreimage;
30+
use crate::types::payment::PaymentPreimage;
3131
use crate::ln::chan_utils::{self, ChannelTransactionParameters, HTLCOutputInCommitment, HolderCommitmentTransaction};
3232
use crate::chain::ClaimId;
3333
use crate::chain::chaininterface::{FeeEstimator, BroadcasterInterface, LowerBoundedFeeEstimator};
@@ -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

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use bitcoin::secp256k1::{SecretKey,PublicKey};
2424
use bitcoin::sighash::EcdsaSighashType;
2525
use bitcoin::transaction::Version;
2626

27-
use crate::ln::types::PaymentPreimage;
27+
use crate::types::payment::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::channelmanager::MIN_CLTV_EXPIRY_DELTA;
3232
use crate::ln::msgs::DecodeError;
@@ -1267,7 +1267,7 @@ mod tests {
12671267
use crate::chain::package::{CounterpartyOfferedHTLCOutput, CounterpartyReceivedHTLCOutput, HolderHTLCOutput, PackageTemplate, PackageSolvingData, RevokedOutput, WEIGHT_REVOKED_OUTPUT, weight_offered_htlc, weight_received_htlc};
12681268
use crate::chain::Txid;
12691269
use crate::ln::chan_utils::HTLCOutputInCommitment;
1270-
use crate::ln::types::{PaymentPreimage, PaymentHash};
1270+
use crate::types::payment::{PaymentPreimage, PaymentHash};
12711271
use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
12721272

12731273
use bitcoin::amount::Amount;
@@ -1279,7 +1279,7 @@ mod tests {
12791279

12801280
use bitcoin::secp256k1::{PublicKey,SecretKey};
12811281
use bitcoin::secp256k1::Secp256k1;
1282-
use crate::ln::features::ChannelTypeFeatures;
1282+
use crate::types::features::ChannelTypeFeatures;
12831283

12841284
use std::str::FromStr;
12851285

lightning/src/events/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ 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;
28-
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
28+
use crate::ln::types::ChannelId;
29+
use crate::types::payment::{PaymentPreimage, PaymentHash, PaymentSecret};
2930
use crate::offers::invoice::Bolt12Invoice;
3031
use crate::onion_message::messenger::Responder;
3132
use crate::routing::gossip::NetworkUpdate;

lightning/src/ln/blinded_payment_tests.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ use bitcoin::secp256k1::ecdsa::{RecoverableSignature, Signature};
1414
use crate::blinded_path;
1515
use crate::blinded_path::payment::{BlindedPaymentPath, PaymentForwardNode, ForwardTlvs, PaymentConstraints, PaymentContext, PaymentRelay, ReceiveTlvs};
1616
use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PaymentFailureReason};
17-
use crate::ln::types::{ChannelId, PaymentHash, PaymentSecret};
17+
use crate::ln::types::ChannelId;
18+
use crate::types::payment::{PaymentHash, PaymentSecret};
1819
use crate::ln::channelmanager;
1920
use crate::ln::channelmanager::{HTLCFailureMsg, PaymentId, RecipientOnionFields};
20-
use crate::ln::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};
21+
use crate::types::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};
2122
use crate::ln::functional_test_utils::*;
2223
use crate::ln::msgs;
2324
use crate::ln::msgs::{ChannelMessageHandler, UnsignedGossipMessage};

lightning/src/ln/bolt11_payment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use bitcoin::hashes::Hash;
1313
use lightning_invoice::Bolt11Invoice;
1414

1515
use crate::ln::channelmanager::RecipientOnionFields;
16-
use crate::ln::types::PaymentHash;
1716
use crate::routing::router::{PaymentParameters, RouteParameters};
17+
use crate::types::payment::PaymentHash;
1818

1919
/// Builds the necessary parameters to pay or pre-flight probe the given zero-amount
2020
/// [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
@@ -87,8 +87,8 @@ fn params_from_invoice(
8787
#[cfg(test)]
8888
mod tests {
8989
use super::*;
90-
use crate::ln::types::PaymentSecret;
9190
use crate::routing::router::Payee;
91+
use crate::types::payment::PaymentSecret;
9292
use bitcoin::hashes::sha256::Hash as Sha256;
9393
use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
9494
use lightning_invoice::{Currency, InvoiceBuilder};

lightning/src/ln/chan_utils.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use bitcoin::hash_types::Txid;
2828
use crate::chain::chaininterface::fee_for_weight;
2929
use crate::chain::package::WEIGHT_REVOKED_OUTPUT;
3030
use crate::sign::EntropySource;
31-
use crate::ln::types::{PaymentHash, PaymentPreimage};
31+
use crate::types::payment::{PaymentHash, PaymentPreimage};
3232
use crate::ln::msgs::DecodeError;
3333
use crate::util::ser::{Readable, RequiredWrapper, Writeable, Writer};
3434
use crate::util::transaction_utils;
@@ -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

@@ -1901,9 +1901,9 @@ mod tests {
19011901
use bitcoin::{Network, Txid, ScriptBuf, CompressedPublicKey};
19021902
use bitcoin::hashes::Hash;
19031903
use bitcoin::hex::FromHex;
1904-
use crate::ln::types::PaymentHash;
1904+
use crate::types::payment::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

+6-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ use bitcoin::secp256k1::{PublicKey,SecretKey};
2525
use bitcoin::secp256k1::{Secp256k1,ecdsa::Signature};
2626
use bitcoin::secp256k1;
2727

28-
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash};
29-
use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
28+
use crate::ln::types::ChannelId;
29+
use crate::types::payment::{PaymentPreimage, PaymentHash};
30+
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
3031
use crate::ln::msgs;
3132
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
3233
use crate::ln::script::{self, ShutdownScript};
@@ -9605,13 +9606,13 @@ mod tests {
96059606
use bitcoin::opcodes;
96069607
use bitcoin::network::Network;
96079608
use crate::ln::onion_utils::INVALID_ONION_BLINDING;
9608-
use crate::ln::types::{PaymentHash, PaymentPreimage};
9609+
use crate::types::payment::{PaymentHash, PaymentPreimage};
96099610
use crate::ln::channel_keys::{RevocationKey, RevocationBasepoint};
96109611
use crate::ln::channelmanager::{self, HTLCSource, PaymentId};
96119612
use crate::ln::channel::InitFeatures;
96129613
use crate::ln::channel::{AwaitingChannelReadyFlags, Channel, ChannelState, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, HTLCUpdateAwaitingACK, commit_tx_fee_sat};
96139614
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};
9615+
use crate::types::features::{ChannelFeatures, ChannelTypeFeatures, NodeFeatures};
96159616
use crate::ln::msgs;
96169617
use crate::ln::msgs::{ChannelUpdate, DecodeError, UnsignedChannelUpdate, MAX_VALUE_MSAT};
96179618
use crate::ln::script::ShutdownScript;
@@ -10293,7 +10294,7 @@ mod tests {
1029310294
use bitcoin::hex::DisplayHex;
1029410295
use bitcoin::secp256k1::Message;
1029510296
use crate::sign::{ChannelDerivationParameters, HTLCDescriptor, ecdsa::EcdsaChannelSigner};
10296-
use crate::ln::PaymentPreimage;
10297+
use crate::types::payment::PaymentPreimage;
1029710298
use crate::ln::channel::{HTLCOutputInCommitment ,TxCreationKeys};
1029810299
use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
1029910300
use crate::ln::chan_utils::{ChannelPublicKeys, HolderCommitmentTransaction, CounterpartyChannelTransactionParameters};

0 commit comments

Comments
 (0)