Add source and target nodes to routing::Score
[rust-lightning] / lightning / src / routing / scorer.rs
index f58da652096349bc2094fb2ce27b4d8be7234113..0f43c3d79283ae8e458b506a783aa72d03f90347 100644 (file)
@@ -44,6 +44,8 @@
 
 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
@@ -71,5 +73,9 @@ impl Default 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
+       }
 }