From: jurvis Date: Thu, 17 Nov 2022 00:53:31 +0000 (-0800) Subject: Remove pub visibility of InFlightHtlcs HashMap X-Git-Tag: v0.0.113~33^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=3136d731ba653caa8f55d7dc420210e845f81aab;p=rust-lightning Remove pub visibility of InFlightHtlcs HashMap --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index fdaffeab2..2d3eed661 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -38,14 +38,15 @@ pub trait Router { ) -> Result; } -/// 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`.