From: Jeffrey Czyz Date: Wed, 27 Oct 2021 17:00:41 +0000 (-0500) Subject: f - Fix 1.36.0 build X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d8acc1009a740de5c9c2bfc07ab248ff7afe7502;p=rust-lightning f - Fix 1.36.0 build --- 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