Remove pub visibility of InFlightHtlcs HashMap
authorjurvis <hello@jurvis.co>
Thu, 17 Nov 2022 00:53:31 +0000 (16:53 -0800)
committerjurvis <hello@jurvis.co>
Sat, 19 Nov 2022 19:20:16 +0000 (11:20 -0800)
lightning/src/routing/router.rs

index fdaffeab23328b59b3b8f83c86a73fdc8ebc8317..2d3eed6614543cfebf78f1915dc691a04c5d56b0 100644 (file)
@@ -38,14 +38,15 @@ pub trait Router {
        ) -> Result<Route, LightningError>;
 }
 
-/// A map with liquidity value (in msat) keyed by a short channel id and the direction the HTLC
-/// is traveling in. The direction boolean is determined by checking if the HTLC source's public
-/// key is less than its destination. See [`InFlightHtlcs::used_liquidity_msat`] for more
-/// details.
-#[cfg(not(any(test, feature = "_test_utils")))]
-pub struct InFlightHtlcs(HashMap<(u64, bool), u64>);
-#[cfg(any(test, feature = "_test_utils"))]
-pub struct InFlightHtlcs(pub HashMap<(u64, bool), u64>);
+/// A data structure for tracking in-flight HTLCs. May be used during pathfinding to account for
+/// in-use channel liquidity.
+pub struct InFlightHtlcs(
+       // A map with liquidity value (in msat) keyed by a short channel id and the direction the HTLC
+       // is traveling in. The direction boolean is determined by checking if the HTLC source's public
+       // key is less than its destination. See `InFlightHtlcs::used_liquidity_msat` for more
+       // details.
+       HashMap<(u64, bool), u64>
+);
 
 impl InFlightHtlcs {
        /// Constructs an empty `InFlightHtlcs`.