X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Frouter.rs;h=b4e2b138433648d9218ce0e8977cb85f4d9197a8;hb=5c6d8a7cb8c2252d112568e03496f6adaa16f774;hp=79838e185bc7f31ff38741a858089853c02ea263;hpb=aa4b429eb213101f64a828dc80a6438912e8664e;p=rust-lightning diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 79838e18..b4e2b138 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -72,22 +72,6 @@ impl>, L: Deref, S: Deref> Router for DefaultR &random_seed_bytes ) } - - fn notify_payment_path_failed(&self, path: &[&RouteHop], short_channel_id: u64) { - self.scorer.lock().payment_path_failed(path, short_channel_id); - } - - fn notify_payment_path_successful(&self, path: &[&RouteHop]) { - self.scorer.lock().payment_path_successful(path); - } - - fn notify_payment_probe_successful(&self, path: &[&RouteHop]) { - self.scorer.lock().probe_successful(path); - } - - fn notify_payment_probe_failed(&self, path: &[&RouteHop], short_channel_id: u64) { - self.scorer.lock().probe_failed(path, short_channel_id); - } } /// A trait defining behavior for routing a payment. @@ -106,14 +90,6 @@ pub trait Router { ) -> Result { self.find_route(payer, route_params, first_hops, inflight_htlcs) } - /// Lets the router know that payment through a specific path has failed. - fn notify_payment_path_failed(&self, path: &[&RouteHop], short_channel_id: u64); - /// Lets the router know that payment through a specific path was successful. - fn notify_payment_path_successful(&self, path: &[&RouteHop]); - /// Lets the router know that a payment probe was successful. - fn notify_payment_probe_successful(&self, path: &[&RouteHop]); - /// Lets the router know that a payment probe failed. - fn notify_payment_probe_failed(&self, path: &[&RouteHop], short_channel_id: u64); } /// [`Score`] implementation that factors in in-flight HTLC liquidity. @@ -357,7 +333,7 @@ impl Readable for Route { /// Parameters needed to find a [`Route`]. /// /// Passed to [`find_route`] and [`build_route_from_hops`], but also provided in -/// [`Event::PaymentPathFailed`] for retrying a failed payment path. +/// [`Event::PaymentPathFailed`]. /// /// [`Event::PaymentPathFailed`]: crate::util::events::Event::PaymentPathFailed #[derive(Clone, Debug, PartialEq, Eq)]