We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a43921b commit 6aa5affCopy full SHA for 6aa5aff
lightning/src/routing/scorer.rs
@@ -170,7 +170,7 @@ impl routing::Score for Scorer {
170
171
#[cfg(not(feature = "no-std"))]
172
fn decay_from(penalty_msat: u64, last_failure: &SystemTime, decay_interval: Duration) -> u64 {
173
- let decays = last_failure.elapsed().map_or(0, |elapsed| {
+ let decays = last_failure.elapsed().ok().map_or(0, |elapsed| {
174
elapsed.as_secs() / decay_interval.as_secs()
175
});
176
penalty_msat >> decays
0 commit comments