Add a scoring decay method to the `ScoreUpdate` trait
authorMatt Corallo <git@bluematt.me>
Mon, 2 Oct 2023 19:14:26 +0000 (19:14 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 9 Dec 2023 00:53:48 +0000 (00:53 +0000)
commit9a3256eb47df201c5197d21560550ad87a9cab69
tree72dbaa3e2b8d10cb90816fa2f2135036b278cdce
parent04425f9e14aa4870d196b55ef6313eb6ac6c0b72
Add a scoring decay method to the `ScoreUpdate` trait

Rather than relying on fetching the current time during
routefinding, here we introduce a new trait method to `ScoreUpdate`
to do so. This largely mirrors what we do with the `NetworkGraph`,
and allows us to take on much more expensive operations (floating
point exponentiation) in our decaying.
lightning-background-processor/src/lib.rs
lightning/src/routing/scoring.rs
lightning/src/util/test_utils.rs