diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index e0c56d0ab..7191f2d81 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -8,3 +8,4 @@ edition = "2018" [dependencies] zebra-chain = { path = "../zebra-chain" } +chrono = "0.4" diff --git a/zebra-network/src/message.rs b/zebra-network/src/message.rs index 17ac64d9a..c9263032c 100644 --- a/zebra-network/src/message.rs +++ b/zebra-network/src/message.rs @@ -2,6 +2,8 @@ use std::net::{SocketAddr}; +use chrono::{DateTime, Utc}; + use zebra_chain; /// A Bitcoin-like network message for the Zcash protocol. @@ -43,7 +45,7 @@ pub enum Message { services: Services, /// The time when the version message was sent. - timestamp: Timestamp, + timestamp: DateTime, /// The network address of the node receiving this message. address_receiving: NetworkAddress, @@ -216,9 +218,6 @@ pub struct Version(pub u32); // away in the future in favor of that. pub struct Services(pub u64); -/// Standard UNIX timestamp in seconds since the Epoch. -pub struct Timestamp(pub i64); - /// A network address but with some extra flavor. /// /// When a network address is needed somewhere, this structure is