Make payment_path_failed path type bindings-mappable
[rust-lightning] / lightning / src / routing / mod.rs
index d6c016468ce79f696483ccafcee03e0269b6267f..a2454f6a3fec0da3dc2e960420750af904dff215 100644 (file)
@@ -30,7 +30,7 @@ pub trait Score {
        fn channel_penalty_msat(&self, short_channel_id: u64, source: &NodeId, target: &NodeId) -> u64;
 
        /// Handles updating channel penalties after failing to route through a channel.
-       fn payment_path_failed(&mut self, path: &Vec<RouteHop>, short_channel_id: u64);
+       fn payment_path_failed(&mut self, path: &[&RouteHop], short_channel_id: u64);
 }
 
 /// A scorer that is accessed under a lock.
@@ -70,7 +70,7 @@ impl<S: Score, T: DerefMut<Target=S>> Score for T {
                self.deref().channel_penalty_msat(short_channel_id, source, target)
        }
 
-       fn payment_path_failed(&mut self, path: &Vec<RouteHop>, short_channel_id: u64) {
+       fn payment_path_failed(&mut self, path: &[&RouteHop], short_channel_id: u64) {
                self.deref_mut().payment_path_failed(path, short_channel_id)
        }
 }