Skip to content

Commit

Permalink
Make the ProbabilisticScoringParameters field public to change it
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TheBlueMatt committed Apr 24, 2023
1 parent 0963597 commit adece2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lightning/src/routing/scoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@ pub type ProbabilisticScorer<G, L> = ProbabilisticScorerUsingTime::<G, L, Config
/// This is not exported to bindings users generally all users should use the [`ProbabilisticScorer`] type alias.
pub struct ProbabilisticScorerUsingTime<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time>
where L::Target: Logger {
params: ProbabilisticScoringParameters,
/// The parameters used when scoring channels for routing. These can be tweaked at runtime
/// between routing calls as necessary. Note that changing decay parameters may or may not
/// impact channels which were last scored prior to the new half-life.
pub params: ProbabilisticScoringParameters,
network_graph: G,
logger: L,
// TODO: Remove entries of closed channels.
Expand Down

0 comments on commit adece2c

Please sign in to comment.