]> 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>
Sat, 4 Mar 2023 02:18:58 +0000 (02:18 +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.

lightning-invoice/src/payment.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/mod.rs

index 981fd2e6ba49225c0e41fb2923ee56e480aea0b7..d5aaa9f42ef08ae011adb94c92e5b3dada4f1142 100644 (file)
@@ -17,7 +17,8 @@ use lightning::chain;
 use lightning::chain::chaininterface::{BroadcasterInterface, FeeEstimator};
 use lightning::chain::keysinterface::{NodeSigner, SignerProvider, EntropySource};
 use lightning::ln::{PaymentHash, PaymentSecret};
-use lightning::ln::channelmanager::{ChannelManager, PaymentId, Retry, RetryableSendFailure};
+use lightning::ln::channelmanager::{ChannelManager, PaymentId};
+use lightning::ln::outbound_payment::{RetryableSendFailure, Retry};
 use lightning::routing::router::{PaymentParameters, RouteParameters, Router};
 use lightning::util::logger::Logger;
 
index 62629fc548679dfa56b9a58ae711704942657e06..150b94d7c45a009db3149897e801d14b302d04b9 100644 (file)
@@ -76,7 +76,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, Retry, RetryableSendFailure};
+use crate::ln::outbound_payment::{PaymentSendFailure, Retry, RetryableSendFailure};
 
 // We hold various information about HTLC relay in the HTLC objects in Channel itself:
 //
index 96ce9312eed3acec30cb9c7e4db7a8114fa804eb..7f27a5bff80f8d655c864dcc325d622f594021a4 100644 (file)
@@ -14,7 +14,8 @@ use crate::chain::{BestBlock, ChannelMonitorUpdateStatus, Confirm, Listen, Watch
 use crate::chain::channelmonitor::ChannelMonitor;
 use crate::chain::transaction::OutPoint;
 use crate::ln::{PaymentPreimage, PaymentHash, PaymentSecret};
-use crate::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs, RAACommitmentOrder, PaymentSendFailure, PaymentId, MIN_CLTV_EXPIRY_DELTA};
+use crate::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs, RAACommitmentOrder, PaymentId, MIN_CLTV_EXPIRY_DELTA};
+use crate::ln::outbound_payment::PaymentSendFailure;
 use crate::routing::gossip::{P2PGossipSync, NetworkGraph, NetworkUpdate};
 use crate::routing::router::{PaymentParameters, Route, get_route};
 use crate::ln::features::InitFeatures;
index bc28063145c84117ce44a0baf4391bd63472d66a..8ac06a0ca326ca45fa8d143a84f78d13fb1fc5f9 100644 (file)
@@ -44,7 +44,7 @@ pub mod channel;
 pub(crate) mod channel;
 
 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