Skip to content

Commit a5610ff

Browse files
committed
expose scorer
1 parent a67a3f6 commit a5610ff

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

lightning/src/routing/scoring.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,21 @@ impl<G: Deref<Target = NetworkGraph<L>> + Clone, L: Logger + Clone> CombinedScor
18711871
}
18721872
}
18731873

1874+
impl<G: Deref<Target = NetworkGraph<L>>, L: Logger> CombinedScorer<G, L> {
1875+
/// Returns a reference to the merged [`ProbabilisticScorer`] used for routing decisions,
1876+
/// which combines locally acquired data with any externally supplied scores.
1877+
pub fn scorer(&self) -> &ProbabilisticScorer<G, L> {
1878+
&self.scorer
1879+
}
1880+
1881+
/// Returns a reference to the [`ProbabilisticScorer`] tracking only locally acquired data
1882+
/// (i.e. excluding any externally supplied scores merged via [`Self::merge`] or
1883+
/// [`Self::set_scores`]).
1884+
pub fn local_only_scorer(&self) -> &ProbabilisticScorer<G, L> {
1885+
&self.local_only_scorer
1886+
}
1887+
}
1888+
18741889
impl<G: Deref<Target = NetworkGraph<L>>, L: Logger> ScoreLookUp for CombinedScorer<G, L> {
18751890
type ScoreParams = ProbabilisticScoringFeeParameters;
18761891

0 commit comments

Comments
 (0)