Skip to content

Commit babd23c

Browse files
committed
Remove probing strategies perfomance test
1 parent 67ea013 commit babd23c

File tree

2 files changed

+2
-359
lines changed

2 files changed

+2
-359
lines changed

src/lib.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,37 +1086,6 @@ impl Node {
10861086
self.prober.as_deref()
10871087
}
10881088

1089-
/// Returns the scorer's estimated `(min, max)` liquidity range for the given channel in the
1090-
/// direction toward `target`, or `None` if the scorer has no data for that channel.
1091-
///
1092-
/// **Warning:** This is expensive — O(scorer size) per call. It works by serializing the
1093-
/// entire `CombinedScorer` and deserializing it as a plain `ProbabilisticScorer` to access
1094-
/// `estimated_channel_liquidity_range`. Intended for testing and debugging, not hot paths.
1095-
pub fn scorer_channel_liquidity(&self, scid: u64, target: PublicKey) -> Option<(u64, u64)> {
1096-
use lightning::routing::scoring::{
1097-
ProbabilisticScorer, ProbabilisticScoringDecayParameters,
1098-
};
1099-
use lightning::util::ser::{ReadableArgs, Writeable};
1100-
1101-
let target_node_id = lightning::routing::gossip::NodeId::from_pubkey(&target);
1102-
1103-
let bytes = {
1104-
let scorer = self.scorer.lock().unwrap();
1105-
let mut buf = Vec::new();
1106-
scorer.write(&mut buf).ok()?;
1107-
buf
1108-
};
1109-
1110-
let decay_params = ProbabilisticScoringDecayParameters::default();
1111-
let prob_scorer = ProbabilisticScorer::read(
1112-
&mut &bytes[..],
1113-
(decay_params, Arc::clone(&self.network_graph), Arc::clone(&self.logger)),
1114-
)
1115-
.ok()?;
1116-
1117-
prob_scorer.estimated_channel_liquidity_range(scid, &target_node_id)
1118-
}
1119-
11201089
/// Retrieve a list of known channels.
11211090
pub fn list_channels(&self) -> Vec<ChannelDetails> {
11221091
self.channel_manager.list_channels().into_iter().map(|c| c.into()).collect()

0 commit comments

Comments
 (0)