]> git.bitcoin.ninja Git - rust-lightning/commit
Add SinceEpoch time to test Scorer hermetically
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 4 Nov 2021 18:58:11 +0000 (13:58 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 8 Nov 2021 21:31:42 +0000 (15:31 -0600)
commit2a7d9c8ddd08bcc205eec223a0f35730271de072
treeb8b9d3be43df10dd6fb672fc99552385dfa18f50
parentc0bbd4d91877b3f7eca5b6aba877257acf4eec0b
Add SinceEpoch time to test Scorer hermetically

In order to test Scorer hermetically, sleeps must be avoided. Add a
SinceEpoch abstraction for manually advancing time. Implement the Time
trait for SinceEpoch so that it can be used with ScorerUsingTime in
tests.
lightning/src/routing/scorer.rs