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>
Wed, 13 Dec 2023 23:26:09 +0000 (23:26 +0000)
commitb84842a9048dcfc1d8d21e1db73e1961b4b175b0
tree86b0c1c92ead9745df113868adbc2e6a0bfc6051
parent6c366cf35f659126134cc5ec17d3c23838d9d83f
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