From 3136d731ba653caa8f55d7dc420210e845f81aab Mon Sep 17 00:00:00 2001 From: jurvis Date: Wed, 16 Nov 2022 16:53:31 -0800 Subject: [PATCH] Remove pub visibility of InFlightHtlcs HashMap --- lightning/src/routing/router.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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`. -- 2.39.5