Skip to content

Commit 3251b10

Browse files
committed
Make the ProbabilisticScoringParameters field public to change it
There's no reason a user shouldn't be able to change the scoring parameters at runtime between routing calls, so we let them do so here by making the parameters field public.
1 parent 978e4ce commit 3251b10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightning/src/routing/scoring.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,10 @@ pub type ProbabilisticScorer<G, L> = ProbabilisticScorerUsingTime::<G, L, Config
365365
/// This is not exported to bindings users generally all users should use the [`ProbabilisticScorer`] type alias.
366366
pub struct ProbabilisticScorerUsingTime<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time>
367367
where L::Target: Logger {
368-
params: ProbabilisticScoringParameters,
368+
/// The parameters used when scoring channels for routing. These can be tweaked at runtime
369+
/// between routing calls as necessary. Note that changing decay parameters may or may not
370+
/// impact channels which were last scored prior to the new half-life.
371+
pub params: ProbabilisticScoringParameters,
369372
network_graph: G,
370373
logger: L,
371374
// TODO: Remove entries of closed channels.

0 commit comments

Comments
 (0)