projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1108 from TheBlueMatt/2021-10-persist-mon-blocks
[rust-lightning]
/
lightning
/
src
/
routing
/
scorer.rs
diff --git
a/lightning/src/routing/scorer.rs
b/lightning/src/routing/scorer.rs
index f58da652096349bc2094fb2ce27b4d8be7234113..0f43c3d79283ae8e458b506a783aa72d03f90347 100644
(file)
--- a/
lightning/src/routing/scorer.rs
+++ b/
lightning/src/routing/scorer.rs
@@
-44,6
+44,8
@@
use routing;
use routing;
+use routing::network_graph::NodeId;
+
/// [`routing::Score`] implementation that provides reasonable default behavior.
///
/// Used to apply a fixed penalty to each channel, thus avoiding long paths when shorter paths with
/// [`routing::Score`] implementation that provides reasonable default behavior.
///
/// Used to apply a fixed penalty to each channel, thus avoiding long paths when shorter paths with
@@
-71,5
+73,9
@@
impl Default for Scorer {
}
impl routing::Score for Scorer {
}
impl routing::Score for Scorer {
- fn channel_penalty_msat(&self, _short_channel_id: u64) -> u64 { self.base_penalty_msat }
+ fn channel_penalty_msat(
+ &self, _short_channel_id: u64, _source: &NodeId, _target: &NodeId
+ ) -> u64 {
+ self.base_penalty_msat
+ }
}
}