Skip to content

Commit bb7e35a

Browse files
committed
Drop the Payment{Hash,Preimage,Secret} re-exports in lightning
These re-exports were deprecated in 0.0.124 in favor of the `lightning::types::payment::*` paths, which we use here.
1 parent 64c1243 commit bb7e35a

40 files changed

+73
-74
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

+1-2
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::types::PaymentSecret;
19-
use lightning::ln::PaymentHash;
2018
use lightning::offers::invoice::UnsignedBolt12Invoice;
2119
use lightning::offers::invoice_request::{InvoiceRequest, InvoiceRequestFields};
2220
use lightning::offers::offer::OfferId;
2321
use lightning::offers::parse::Bolt12SemanticError;
2422
use lightning::sign::EntropySource;
2523
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/refund_deser.rs

+1-2
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::types::PaymentSecret;
19-
use lightning::ln::PaymentHash;
2018
use lightning::offers::invoice::UnsignedBolt12Invoice;
2119
use lightning::offers::parse::Bolt12SemanticError;
2220
use lightning::offers::refund::Refund;
2321
use lightning::sign::EntropySource;
2422
use lightning::types::features::BlindedHopFeatures;
23+
use lightning::types::payment::{PaymentHash, PaymentSecret};
2524
use lightning::util::ser::Writeable;
2625

2726
#[inline]

lightning-background-processor/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1092,13 +1092,14 @@ mod tests {
10921092
use lightning::ln::peer_handler::{
10931093
IgnoringMessageHandler, MessageHandler, PeerManager, SocketDescriptor,
10941094
};
1095-
use lightning::ln::types::{ChannelId, PaymentHash};
1095+
use lightning::ln::types::ChannelId;
10961096
use lightning::onion_message::messenger::{DefaultMessageRouter, OnionMessenger};
10971097
use lightning::routing::gossip::{NetworkGraph, P2PGossipSync};
10981098
use lightning::routing::router::{CandidateRouteHop, DefaultRouter, Path, RouteHop};
10991099
use lightning::routing::scoring::{ChannelUsage, LockableScore, ScoreLookUp, ScoreUpdate};
11001100
use lightning::sign::{ChangeDestinationSource, InMemorySigner, KeysManager};
11011101
use lightning::types::features::{ChannelFeatures, NodeFeatures};
1102+
use lightning::types::payment::PaymentHash;
11021103
use lightning::util::config::UserConfig;
11031104
use lightning::util::persist::{
11041105
KVStore, CHANNEL_MANAGER_PERSISTENCE_KEY, CHANNEL_MANAGER_PERSISTENCE_PRIMARY_NAMESPACE,

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ 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;
2121
use crate::types::features::BlindedHopFeatures;
2222
use crate::ln::msgs::DecodeError;
@@ -632,7 +632,7 @@ 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;
635+
use crate::types::payment::PaymentSecret;
636636
use crate::types::features::BlindedHopFeatures;
637637
use crate::ln::functional_test_utils::TEST_FINAL_CLTV;
638638

lightning/src/chain/channelmonitor.rs

+4-2
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};
@@ -5006,7 +5007,8 @@ mod tests {
50065007
use crate::chain::package::{weight_offered_htlc, weight_received_htlc, weight_revoked_offered_htlc, weight_revoked_received_htlc, WEIGHT_REVOKED_OUTPUT};
50075008
use crate::chain::transaction::OutPoint;
50085009
use crate::sign::InMemorySigner;
5009-
use crate::ln::types::{PaymentPreimage, PaymentHash, ChannelId};
5010+
use crate::ln::types::ChannelId;
5011+
use crate::types::payment::{PaymentPreimage, PaymentHash};
50105012
use crate::ln::channel_keys::{DelayedPaymentBasepoint, DelayedPaymentKey, HtlcBasepoint, RevocationBasepoint, RevocationKey};
50115013
use crate::ln::chan_utils::{self,HTLCOutputInCommitment, ChannelPublicKeys, ChannelTransactionParameters, HolderCommitmentTransaction, CounterpartyChannelTransactionParameters};
50125014
use crate::ln::channelmanager::{PaymentSendFailure, PaymentId, RecipientOnionFields};

lightning/src/chain/onchaintx.rs

+1-1
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};

lightning/src/chain/package.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ 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};
2929
use crate::types::features::ChannelTypeFeatures;
3030
use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
@@ -1199,7 +1199,7 @@ mod tests {
11991199
use crate::chain::package::{CounterpartyOfferedHTLCOutput, CounterpartyReceivedHTLCOutput, HolderHTLCOutput, PackageTemplate, PackageSolvingData, RevokedOutput, WEIGHT_REVOKED_OUTPUT, weight_offered_htlc, weight_received_htlc};
12001200
use crate::chain::Txid;
12011201
use crate::ln::chan_utils::HTLCOutputInCommitment;
1202-
use crate::ln::types::{PaymentPreimage, PaymentHash};
1202+
use crate::types::payment::{PaymentPreimage, PaymentHash};
12031203
use crate::ln::channel_keys::{DelayedPaymentBasepoint, HtlcBasepoint};
12041204

12051205
use bitcoin::amount::Amount;

lightning/src/events/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ use crate::ln::channelmanager::{InterceptId, PaymentId, RecipientOnionFields};
2525
use crate::ln::channel::FUNDING_CONF_DEADLINE_BLOCKS;
2626
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ 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};
2021
use crate::types::features::{BlindedHopFeatures, ChannelFeatures, NodeFeatures};

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

+2-2
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;
@@ -1901,7 +1901,7 @@ 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;
19061906
use crate::types::features::ChannelTypeFeatures;
19071907

lightning/src/ln/channel.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ 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};
28+
use crate::ln::types::ChannelId;
29+
use crate::types::payment::{PaymentPreimage, PaymentHash};
2930
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
3031
use crate::ln::msgs;
3132
use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
@@ -9605,7 +9606,7 @@ 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;
@@ -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};

lightning/src/ln/channel_state.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ use crate::chain::transaction::OutPoint;
1818
use crate::io;
1919
use crate::ln::channel::ChannelContext;
2020
use crate::ln::msgs::DecodeError;
21-
use crate::ln::types::{ChannelId, PaymentHash};
21+
use crate::ln::types::ChannelId;
2222
use crate::sign::SignerProvider;
2323
use crate::types::features::{ChannelTypeFeatures, InitFeatures};
24+
use crate::types::payment::PaymentHash;
2425
use crate::util::config::ChannelConfig;
2526
use crate::util::ser::{Readable, Writeable, Writer};
2627

lightning/src/ln/channelmanager.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ use crate::events::{Event, EventHandler, EventsProvider, MessageSendEvent, Messa
4747
// Since this struct is returned in `list_channels` methods, expose it here in case users want to
4848
// construct one themselves.
4949
use crate::ln::inbound_payment;
50-
use crate::ln::types::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
50+
use crate::ln::types::ChannelId;
51+
use crate::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
5152
use crate::ln::channel::{self, Channel, ChannelPhase, ChannelContext, ChannelError, ChannelUpdateStatus, ShutdownResult, UnfundedChannelContext, UpdateFulfillCommitFetch, OutboundV1Channel, InboundV1Channel, WithChannelContext};
5253
use crate::ln::channel_state::ChannelDetails;
5354
use crate::types::features::{Bolt12InvoiceFeatures, ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures};
@@ -1787,7 +1788,7 @@ where
17871788
///
17881789
/// ```
17891790
/// # use lightning::events::{Event, EventsProvider};
1790-
/// # use lightning::ln::types::PaymentHash;
1791+
/// # use lightning::types::payment::PaymentHash;
17911792
/// # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry};
17921793
/// # use lightning::routing::router::RouteParameters;
17931794
/// #
@@ -13114,7 +13115,8 @@ mod tests {
1311413115
use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
1311513116
use core::sync::atomic::Ordering;
1311613117
use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, ClosureReason};
13117-
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
13118+
use crate::ln::types::ChannelId;
13119+
use crate::types::payment::{PaymentPreimage, PaymentHash, PaymentSecret};
1311813120
use crate::ln::channelmanager::{create_recv_pending_htlc_info, HTLCForwardInfo, inbound_payment, PaymentId, PaymentSendFailure, RecipientOnionFields, InterceptId};
1311913121
use crate::ln::functional_test_utils::*;
1312013122
use crate::ln::msgs::{self, ErrorAction};

lightning/src/ln/functional_test_utils.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ use crate::chain::channelmonitor::ChannelMonitor;
1515
use crate::chain::transaction::OutPoint;
1616
use crate::events::{ClaimedHTLC, ClosureReason, Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentPurpose, PaymentFailureReason};
1717
use crate::events::bump_transaction::{BumpTransactionEvent, BumpTransactionEventHandler, Wallet, WalletSource};
18-
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash, PaymentSecret};
18+
use crate::ln::types::ChannelId;
19+
use crate::types::payment::{PaymentPreimage, PaymentHash, PaymentSecret};
1920
use crate::ln::channelmanager::{AChannelManager, ChainParameters, ChannelManager, ChannelManagerReadArgs, RAACommitmentOrder, PaymentSendFailure, RecipientOnionFields, PaymentId, MIN_CLTV_EXPIRY_DELTA};
2021
use crate::types::features::InitFeatures;
2122
use crate::ln::msgs;

lightning/src/ln/functional_tests.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ use crate::chain::channelmonitor::{CLOSED_CHANNEL_UPDATE_ID, CLTV_CLAIM_BUFFER,
1919
use crate::chain::transaction::OutPoint;
2020
use crate::sign::{ecdsa::EcdsaChannelSigner, EntropySource, OutputSpender, SignerProvider};
2121
use crate::events::{Event, FundingInfo, MessageSendEvent, MessageSendEventsProvider, PathFailure, PaymentPurpose, ClosureReason, HTLCDestination, PaymentFailureReason};
22-
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentSecret, PaymentHash};
22+
use crate::ln::types::ChannelId;
23+
use crate::types::payment::{PaymentPreimage, PaymentSecret, PaymentHash};
2324
use crate::ln::channel::{CONCURRENT_INBOUND_HTLC_FEE_BUFFER, FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE, MIN_AFFORDABLE_HTLC_COUNT, get_holder_selected_channel_reserve_satoshis, OutboundV1Channel, InboundV1Channel, COINBASE_MATURITY, ChannelPhase};
2425
use crate::ln::channelmanager::{self, PaymentId, RAACommitmentOrder, PaymentSendFailure, RecipientOnionFields, BREAKDOWN_TIMEOUT, ENABLE_GOSSIP_TICKS, DISABLE_GOSSIP_TICKS, MIN_CLTV_EXPIRY_DELTA};
2526
use crate::ln::channel::{DISCONNECT_PEER_AWAITING_RESPONSE_TICKS, ChannelError};

lightning/src/ln/inbound_payment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::crypto::chacha20::ChaCha20;
1818
use crate::crypto::utils::hkdf_extract_expand_5x;
1919
use crate::ln::msgs;
2020
use crate::ln::msgs::MAX_VALUE_MSAT;
21-
use crate::ln::types::{PaymentHash, PaymentPreimage, PaymentSecret};
21+
use crate::types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
2222
use crate::offers::nonce::Nonce;
2323
use crate::sign::{KeyMaterial, EntropySource};
2424
use crate::util::errors::APIError;

lightning/src/ln/invoice_utils.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use bitcoin::hashes::Hash;
99
use crate::chain;
1010
use crate::chain::chaininterface::{BroadcasterInterface, FeeEstimator};
1111
use crate::sign::{Recipient, NodeSigner, SignerProvider, EntropySource};
12-
use crate::ln::types::{PaymentHash, PaymentSecret};
12+
use crate::types::payment::{PaymentHash, PaymentSecret};
1313
use crate::ln::channel_state::ChannelDetails;
1414
use crate::ln::channelmanager::{ChannelManager, MIN_FINAL_CLTV_EXPIRY_DELTA};
1515
use crate::ln::channelmanager::{PhantomRouteHints, MIN_CLTV_EXPIRY_DELTA};
@@ -835,8 +835,7 @@ mod test {
835835
use bitcoin::hashes::sha256::Hash as Sha256;
836836
use crate::sign::PhantomKeysManager;
837837
use crate::events::{MessageSendEvent, MessageSendEventsProvider};
838-
use crate::ln::types::PaymentHash;
839-
use crate::ln::types::PaymentPreimage;
838+
use crate::types::payment::{PaymentHash, PaymentPreimage};
840839
use crate::ln::channelmanager::{PhantomRouteHints, MIN_FINAL_CLTV_EXPIRY_DELTA, PaymentId, RecipientOnionFields, Retry};
841840
use crate::ln::functional_test_utils::*;
842841
use crate::ln::msgs::ChannelMessageHandler;

lightning/src/ln/max_payment_path_len_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use bitcoin::secp256k1::{Secp256k1, PublicKey};
1414
use crate::blinded_path::BlindedHop;
1515
use crate::blinded_path::payment::{BlindedPayInfo, BlindedPaymentPath, PaymentConstraints, PaymentContext, ReceiveTlvs};
1616
use crate::events::{Event, MessageSendEventsProvider};
17-
use crate::ln::PaymentSecret;
17+
use crate::types::payment::PaymentSecret;
1818
use crate::ln::blinded_payment_tests::get_blinded_route_parameters;
1919
use crate::ln::channelmanager::PaymentId;
2020
use crate::types::features::BlindedHopFeatures;

lightning/src/ln/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
// licenses.
99

1010
//! Implementations of various parts of the Lightning protocol are in this module.
11-
//!
12-
//! Note that the re-exports of [`PaymentHash`], [`PaymentPreimage`], and [`PaymentSecret`] here
13-
//! are deprecated and will be removed in a future version. Instead, use them via
14-
//! [`lightning::types::payment`].
15-
//!
16-
//! [`lightning::types::payment`]: crate::types::payment
1711
1812
#[cfg(any(test, feature = "_test_utils"))]
1913
#[macro_use]
@@ -36,8 +30,6 @@ pub mod types;
3630
pub mod invoice_utils;
3731
pub mod bolt11_payment;
3832

39-
pub use lightning_types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
40-
4133
#[cfg(fuzzing)]
4234
pub mod peer_channel_encryptor;
4335
#[cfg(not(fuzzing))]

0 commit comments

Comments
 (0)