Revert "node: Use `std::time` for reactor and wire"
This reverts commit e404f1038f461264f9395742ef74f5b710bef54a.
The commit above introduced the Epoch type to reduce the need for
depending on the localtime crate. Eventually, node operators noticed
that announcements would appear to be in the future and cause
connection issues.
After more research, an issue1 was found that describes how on some
platforms, primarily Linux and MacOS, Instant::duration_since would
return a shortened duration. This is the cause of this apparent drift
in time.
1
https://github.com/rust-lang/rust/issues/87906
3 files changed
+52
-81
58305cda
→
a929a58f
modified crates/radicle-node/src/reactor.rs
@@ -10,10 +10,11 @@ use std::fmt::{Debug, Display, Formatter};
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -211,7 +212,7 @@ pub trait ReactionHandler: Send + Iterator<Item = Action<Self::Listener, Self::T
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -226,7 +227,7 @@ pub trait ReactionHandler: Send + Iterator<Item = Action<Self::Listener, Self::T
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -234,7 +235,7 @@ pub trait ReactionHandler: Send + Iterator<Item = Action<Self::Listener, Self::T
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -371,7 +372,7 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -387,12 +388,12 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -403,9 +404,7 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -421,14 +420,14 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -450,7 +449,7 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -471,8 +470,7 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -490,13 +488,13 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -506,7 +504,7 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -564,7 +562,7 @@ impl<H: ReactionHandler> Runtime<H> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/reactor/timer.rs
@@ -1,11 +1,13 @@
| + | |
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -29,32 +31,32 @@ impl Timer {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -70,12 +72,12 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -83,7 +85,7 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -92,13 +94,13 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -106,17 +108,17 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/wire.rs
@@ -5,7 +5,6 @@ use std::collections::hash_map::Entry;
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -13,6 +12,7 @@ use cyphernet::addr::{HostName, InetHost, NetAddr};
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -291,35 +291,6 @@ impl Peers {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -342,8 +313,6 @@ pub(crate) struct Wire<D, S, G: crypto::signature::Signer<crypto::Signature> + E
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
@@ -366,14 +335,9 @@ where
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -532,7 +496,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -545,8 +509,10 @@ where
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -557,7 +523,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -621,7 +587,12 @@ where
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|