What changed, and why it matters
This commit simply adds two public getter methods that expose internal scoring objects for reading. It does not change any logic, permissions, or behavior. There is no security issue visible in the diff.
No action required; this is a benign API-visibility change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds scorer() and local_only_scorer() public methods on CombinedScorer<G, L> that return immutable references (&ProbabilisticScorer<G, L>) to existing internal fields. The methods are read-only and do not introduce mutation paths, unsafe code, trait bound changes, or serialization differences. The existing ScoreLookUp implementation remains unchanged.
Changed components
lightning/src/routing/scoring.rsInspect captured patch +15 / −0
diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs
index 47621e3..1592bc0 100644
--- a/lightning/src/routing/scoring.rs
+++ b/lightning/src/routing/scoring.rs
@@ -1871,6 +1871,21 @@ impl<G: Deref<Target = NetworkGraph<L>> + Clone, L: Logger + Clone> CombinedScor
}
}
+impl<G: Deref<Target = NetworkGraph<L>>, L: Logger> CombinedScorer<G, L> {
+ /// Returns a reference to the merged [`ProbabilisticScorer`] used for routing decisions,
+ /// which combines locally acquired data with any externally supplied scores.
+ pub fn scorer(&self) -> &ProbabilisticScorer<G, L> {
+ &self.scorer
+ }
+
+ /// Returns a reference to the [`ProbabilisticScorer`] tracking only locally acquired data
+ /// (i.e. excluding any externally supplied scores merged via [`Self::merge`] or
+ /// [`Self::set_scores`]).
+ pub fn local_only_scorer(&self) -> &ProbabilisticScorer<G, L> {
+ &self.local_only_scorer
+ }
+}
+
impl<G: Deref<Target = NetworkGraph<L>>, L: Logger> ScoreLookUp for CombinedScorer<G, L> {
type ScoreParams = ProbabilisticScoringFeeParameters;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.