]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Export `outbound_payment` structs in their respective modules
authorMatt Corallo <git@bluematt.me>
Tue, 28 Feb 2023 21:45:14 +0000 (21:45 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 3 Oct 2023 23:22:29 +0000 (23:22 +0000)
Re-exports in Rust make `use` statements a little shorter, but for
otherwise don't materially change a crate's API. Sadly, the C
bindings generator currently can't figure out re-exports, but it
also exports everything into one global namespace, so it doesn't
matter much anyway.

fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
lightning-invoice/src/payment.rs
lightning-invoice/src/utils.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/mod.rs

index 2a1b9e9a70a2fff9f4026879b26249ee79d89357..5dc6ed52704601003ba33ba279101a5471a0dc0c 100644 (file)
@@ -39,7 +39,8 @@ use lightning::sign::{KeyMaterial, InMemorySigner, Recipient, EntropySource, Nod
 use lightning::events;
 use lightning::events::MessageSendEventsProvider;
 use lightning::ln::{PaymentHash, PaymentPreimage, PaymentSecret};
-use lightning::ln::channelmanager::{ChainParameters, ChannelDetails, ChannelManager, PaymentSendFailure, ChannelManagerReadArgs, PaymentId, RecipientOnionFields};
+use lightning::ln::channelmanager::{ChainParameters, ChannelDetails, ChannelManager, ChannelManagerReadArgs, PaymentId};
+use lightning::ln::outbound_payment::{RecipientOnionFields, PaymentSendFailure};
 use lightning::ln::channel::FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE;
 use lightning::ln::msgs::{self, CommitmentUpdate, ChannelMessageHandler, DecodeError, UpdateAddHTLC, Init};
 use lightning::ln::script::ShutdownScript;
index d7167146cac18d90c58d31f617f5af677875bbbf..87ee72db06bf2fd08ae11ebe6a015fe2d03862c6 100644 (file)
@@ -35,7 +35,8 @@ use lightning::chain::transaction::OutPoint;
 use lightning::sign::{InMemorySigner, Recipient, KeyMaterial, EntropySource, NodeSigner, SignerProvider};
 use lightning::events::Event;
 use lightning::ln::{ChannelId, PaymentHash, PaymentPreimage, PaymentSecret};
-use lightning::ln::channelmanager::{ChainParameters, ChannelDetails, ChannelManager, PaymentId, RecipientOnionFields, Retry};
+use lightning::ln::channelmanager::{ChainParameters, ChannelDetails, ChannelManager, PaymentId};
+use lightning::ln::outbound_payment::{RecipientOnionFields, Retry};
 use lightning::ln::peer_handler::{MessageHandler,PeerManager,SocketDescriptor,IgnoringMessageHandler};
 use lightning::ln::msgs::{self, DecodeError};
 use lightning::ln::script::ShutdownScript;
index 0247913634a24f30cab3e8bb2a77ab3c49d7fdf1..85edc5eb8afe45e12afc7e718d7b145ec382cda2 100644 (file)
@@ -18,7 +18,8 @@ use lightning::chain;
 use lightning::chain::chaininterface::{BroadcasterInterface, FeeEstimator};
 use lightning::sign::{NodeSigner, SignerProvider, EntropySource};
 use lightning::ln::PaymentHash;
-use lightning::ln::channelmanager::{AChannelManager, ChannelManager, PaymentId, Retry, RetryableSendFailure, RecipientOnionFields, ProbeSendFailure};
+use lightning::ln::channelmanager::{AChannelManager, ChannelManager, PaymentId};
+use lightning::ln::outbound_payment::{ProbeSendFailure, RecipientOnionFields, RetryableSendFailure, Retry};
 use lightning::routing::router::{PaymentParameters, RouteParameters, Router};
 use lightning::util::logger::Logger;
 
index a512b2de05dd74eb7125bf543d44fd0dbe5ec315..2a2054a4749b2ff6f4a327bab81aa6d721bb493a 100644 (file)
@@ -800,7 +800,8 @@ mod test {
        use lightning::sign::PhantomKeysManager;
        use lightning::events::{MessageSendEvent, MessageSendEventsProvider, Event, EventsProvider};
        use lightning::ln::{PaymentPreimage, PaymentHash};
-       use lightning::ln::channelmanager::{PhantomRouteHints, MIN_FINAL_CLTV_EXPIRY_DELTA, PaymentId, RecipientOnionFields, Retry};
+       use lightning::ln::channelmanager::{PhantomRouteHints, MIN_FINAL_CLTV_EXPIRY_DELTA, PaymentId};
+       use lightning::ln::outbound_payment::{RecipientOnionFields, Retry};
        use lightning::ln::functional_test_utils::*;
        use lightning::ln::msgs::ChannelMessageHandler;
        use lightning::routing::router::{PaymentParameters, RouteParameters};
index 62c6741fbdf89f25595e2c855b7dbb2fdc2e609a..25c5a35fded29cc34193353ef990fc163a7a615c 100644 (file)
@@ -77,7 +77,7 @@ use core::time::Duration;
 use core::ops::Deref;
 
 // Re-export this for use in the public API.
-pub use crate::ln::outbound_payment::{PaymentSendFailure, ProbeSendFailure, Retry, RetryableSendFailure, RecipientOnionFields};
+pub(crate) use crate::ln::outbound_payment::{PaymentSendFailure, ProbeSendFailure, Retry, RetryableSendFailure, RecipientOnionFields};
 use crate::ln::script::ShutdownScript;
 
 // We hold various information about HTLC relay in the HTLC objects in Channel itself:
index beefd2d463b3ed2b938c6f82fdabef63757adccd..4b0f073836e3958efabbfffd748c4a49c4e38a4c 100644 (file)
@@ -36,7 +36,7 @@ pub(crate) mod channel;
 pub use channel_id::ChannelId;
 
 pub(crate) mod onion_utils;
-mod outbound_payment;
+pub mod outbound_payment;
 pub mod wire;
 
 // Older rustc (which we support) refuses to let us call the get_payment_preimage_hash!() macro