From d8acc1009a740de5c9c2bfc07ab248ff7afe7502 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Wed, 27 Oct 2021 12:00:41 -0500 Subject: [PATCH] f - Fix 1.36.0 build --- lightning/src/routing/scorer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/routing/scorer.rs b/lightning/src/routing/scorer.rs index d2a7cebd3..fab40b6f9 100644 --- a/lightning/src/routing/scorer.rs +++ b/lightning/src/routing/scorer.rs @@ -170,7 +170,7 @@ impl routing::Score for Scorer { #[cfg(not(feature = "no-std"))] fn decay_from(penalty_msat: u64, last_failure: &SystemTime, decay_interval: Duration) -> u64 { - let decays = last_failure.elapsed().map_or(0, |elapsed| { + let decays = last_failure.elapsed().ok().map_or(0, |elapsed| { elapsed.as_secs() / decay_interval.as_secs() }); penalty_msat >> decays -- 2.39.5