Skip to content

Commit 3136d73

Browse files
committed
Remove pub visibility of InFlightHtlcs HashMap
1 parent 84ba180 commit 3136d73

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lightning/src/routing/router.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ pub trait Router {
3838
) -> Result<Route, LightningError>;
3939
}
4040

41-
/// A map with liquidity value (in msat) keyed by a short channel id and the direction the HTLC
42-
/// is traveling in. The direction boolean is determined by checking if the HTLC source's public
43-
/// key is less than its destination. See [`InFlightHtlcs::used_liquidity_msat`] for more
44-
/// details.
45-
#[cfg(not(any(test, feature = "_test_utils")))]
46-
pub struct InFlightHtlcs(HashMap<(u64, bool), u64>);
47-
#[cfg(any(test, feature = "_test_utils"))]
48-
pub struct InFlightHtlcs(pub HashMap<(u64, bool), u64>);
41+
/// A data structure for tracking in-flight HTLCs. May be used during pathfinding to account for
42+
/// in-use channel liquidity.
43+
pub struct InFlightHtlcs(
44+
// A map with liquidity value (in msat) keyed by a short channel id and the direction the HTLC
45+
// is traveling in. The direction boolean is determined by checking if the HTLC source's public
46+
// key is less than its destination. See `InFlightHtlcs::used_liquidity_msat` for more
47+
// details.
48+
HashMap<(u64, bool), u64>
49+
);
4950

5051
impl InFlightHtlcs {
5152
/// Constructs an empty `InFlightHtlcs`.

0 commit comments

Comments
 (0)