]> git.bitcoin.ninja Git - rust-lightning/commit
Use `MonotonicTime` as `Instant` shifted by 10 years forward
authorAndrei <andrei.i@posteo.de>
Thu, 29 Jun 2023 00:00:00 +0000 (00:00 +0000)
committerAndrei <andrei.i@posteo.de>
Thu, 29 Jun 2023 00:00:00 +0000 (00:00 +0000)
commit189b070f626d9223271895473c04b31695ff3e35
tree79d43838e1085f6810b86d8019f23c52b763edac
parentbd1206777735696c7aa5ece2f2f2bda6c5a87661
Use `MonotonicTime` as `Instant` shifted by 10 years forward

Such implementation allows `MonotonicTime` to go backward up to 10
years on all platforms. On some platforms (e.g. iOS) `Instant` is
represented as `u64` of nanoseconds since the boot of the system.
Obviously such implementation does not allow to go backward before the
time of the boot.

Co-authored-by: Andrei <andrei.i@posteo.de>
Co-authored-by: Jeffrey Czyz <jkczyz@gmail.com>
lightning/src/ln/outbound_payment.rs
lightning/src/routing/scoring.rs
lightning/src/util/time.rs