Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: Update `localtime` crate
Alexis Sellier committed 3 years ago
commit 94899f7be23a345be12973c57f48cda52a3f56a8
parent 5fb5df2e616946e00cc76d04f19097b54b64bffe
3 files changed +5 -5
modified Cargo.lock
@@ -1335,9 +1335,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"

[[package]]
name = "localtime"
-
version = "1.1.0"
+
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "f752d9826e5de9509879546e12b57259942fcbf2356bc2006f7da5f3fb2be587"
+
checksum = "b2f2e37f115cdc432fcf760063d45a928f0ea80bcf10be3a6e516cbba883b15e"

[[package]]
name = "log"
modified radicle-node/Cargo.toml
@@ -23,7 +23,7 @@ io-reactor = { version = "0.1.1", features = ["popol"] }
lexopt = { version = "0.2.1" }
libc = { version = "0.2.137" }
log = { version = "0.4.17", features = ["std"] }
-
localtime = { version = "1.1.0" }
+
localtime = { version = "1.2.0" }
netservices = { version = "0.2.0", features = ["io-reactor", "socket2"] }
nonempty = { version = "0.8.1", features = ["serialize"] }
qcheck = { version = "1", default-features = false, optional = true }
modified radicle-node/src/wire/protocol.rs
@@ -417,8 +417,8 @@ where
    type Command = Control<G>;

    fn tick(&mut self, time: Timestamp) {
-
        // TODO: Use millisecond precision.
-
        self.service.tick(LocalTime::from_secs(time.as_secs()));
+
        self.service
+
            .tick(LocalTime::from_millis(time.as_millis() as u128));
    }

    fn handle_timer(&mut self) {