Bump `chrono` from 0.4.34 to 0.4.38 (#8400)
* Bump `chrono` from 0.4.34 to 0.4.38 * Stop using the deprecated `from_timestamp_opt` --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
f1334a8378
commit
2ba837470e
|
@ -705,9 +705,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.34"
|
||||
version = "0.4.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
|
||||
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
|
||||
dependencies = [
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
|
|
|
@ -100,7 +100,7 @@ zcash_note_encryption = "0.4.0"
|
|||
zcash_primitives = { version = "0.13.0-rc.1", features = ["transparent-inputs"] }
|
||||
|
||||
# Time
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std", "serde"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std", "serde"] }
|
||||
humantime = "2.1.0"
|
||||
|
||||
# Error Handling & Formatting
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Generate large transparent blocks and transactions for testing.
|
||||
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use chrono::DateTime;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{
|
||||
|
@ -42,18 +42,6 @@ pub fn transaction() -> (Transaction, Vec<u8>) {
|
|||
(transaction, transaction_bytes)
|
||||
}
|
||||
|
||||
/// Returns a generated transparent lock time, and its canonical serialized bytes.
|
||||
pub fn lock_time() -> (LockTime, Vec<u8>) {
|
||||
let lock_time = LockTime::Time(DateTime::<Utc>::from_naive_utc_and_offset(
|
||||
NaiveDateTime::from_timestamp_opt(61, 0)
|
||||
.expect("in-range number of seconds and valid nanosecond"),
|
||||
Utc,
|
||||
));
|
||||
let lock_time_bytes = lock_time.zcash_serialize_to_vec().unwrap();
|
||||
|
||||
(lock_time, lock_time_bytes)
|
||||
}
|
||||
|
||||
/// Returns a generated transparent input, and its canonical serialized bytes.
|
||||
pub fn input() -> (transparent::Input, Vec<u8>) {
|
||||
// Some of the test vectors are in a non-canonical format,
|
||||
|
@ -182,8 +170,8 @@ fn single_transaction_block_many_inputs(oversized: bool) -> Block {
|
|||
// A block header
|
||||
let (block_header, block_header_bytes) = block_header();
|
||||
|
||||
// A LockTime
|
||||
let (lock_time, lock_time_bytes) = lock_time();
|
||||
let lock_time = LockTime::Time(DateTime::from_timestamp(61, 0).unwrap());
|
||||
let lock_time_bytes = lock_time.zcash_serialize_to_vec().unwrap();
|
||||
|
||||
// Calculate the number of inputs we need,
|
||||
// subtracting the bytes used to serialize the expected input count,
|
||||
|
@ -256,8 +244,8 @@ fn single_transaction_block_many_outputs(oversized: bool) -> Block {
|
|||
// A block header
|
||||
let (block_header, block_header_bytes) = block_header();
|
||||
|
||||
// A LockTime
|
||||
let (lock_time, lock_time_bytes) = lock_time();
|
||||
let lock_time = LockTime::Time(DateTime::from_timestamp(61, 0).unwrap());
|
||||
let lock_time_bytes = lock_time.zcash_serialize_to_vec().unwrap();
|
||||
|
||||
// Calculate the number of outputs we need,
|
||||
// subtracting the bytes used to serialize the expected output count,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Fixed test vectors for transactions.
|
||||
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use chrono::DateTime;
|
||||
use color_eyre::eyre::Result;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
|
@ -220,13 +220,6 @@ fn deserialize_large_transaction() {
|
|||
let output =
|
||||
transparent::Output::zcash_deserialize(&zebra_test::vectors::DUMMY_OUTPUT1[..]).unwrap();
|
||||
|
||||
// Create a lock time.
|
||||
let lock_time = LockTime::Time(DateTime::<Utc>::from_naive_utc_and_offset(
|
||||
NaiveDateTime::from_timestamp_opt(61, 0)
|
||||
.expect("in-range number of seconds and valid nanosecond"),
|
||||
Utc,
|
||||
));
|
||||
|
||||
// Serialize the input so that we can determine its serialized size.
|
||||
let mut input_data = Vec::new();
|
||||
input
|
||||
|
@ -241,14 +234,12 @@ fn deserialize_large_transaction() {
|
|||
.take(tx_inputs_num)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let outputs = vec![output];
|
||||
|
||||
// Create an oversized transaction. Adding the output and lock time causes
|
||||
// the transaction to overflow the threshold.
|
||||
let oversized_tx = Transaction::V1 {
|
||||
inputs,
|
||||
outputs,
|
||||
lock_time,
|
||||
outputs: vec![output],
|
||||
lock_time: LockTime::Time(DateTime::from_timestamp(61, 0).unwrap()),
|
||||
};
|
||||
|
||||
// Serialize the transaction.
|
||||
|
|
|
@ -43,7 +43,7 @@ jubjub = "0.10.0"
|
|||
rand = "0.8.5"
|
||||
rayon = "1.10.0"
|
||||
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
|
||||
displaydoc = "0.2.4"
|
||||
lazy_static = "1.4.0"
|
||||
once_cell = "1.18.0"
|
||||
|
|
|
@ -43,7 +43,7 @@ proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"]
|
|||
bitflags = "2.5.0"
|
||||
byteorder = "1.5.0"
|
||||
bytes = "1.6.0"
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
|
||||
dirs = "5.0.1"
|
||||
hex = "0.4.3"
|
||||
humantime-serde = "1.1.1"
|
||||
|
|
|
@ -42,7 +42,7 @@ proptest-impl = [
|
|||
]
|
||||
|
||||
[dependencies]
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
|
||||
futures = "0.3.30"
|
||||
|
||||
# lightwalletd sends JSON-RPC requests over HTTP 1.1
|
||||
|
|
|
@ -59,7 +59,7 @@ zebra-state = { path = "../zebra-state", version = "1.0.0-beta.36", features = [
|
|||
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.36", features = ["shielded-scan"] }
|
||||
zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.3" }
|
||||
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std", "serde"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std", "serde"] }
|
||||
|
||||
# test feature proptest-impl
|
||||
proptest = { version = "1.4.0", optional = true }
|
||||
|
|
|
@ -47,7 +47,7 @@ elasticsearch = [
|
|||
|
||||
[dependencies]
|
||||
bincode = "1.3.3"
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
|
||||
dirs = "5.0.1"
|
||||
futures = "0.3.30"
|
||||
hex = "0.4.3"
|
||||
|
|
|
@ -173,7 +173,7 @@ zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.36", optional = t
|
|||
|
||||
abscissa_core = "0.7.0"
|
||||
clap = { version = "4.5.4", features = ["cargo"] }
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std"] }
|
||||
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
|
||||
humantime-serde = "1.1.1"
|
||||
indexmap = "2.2.6"
|
||||
lazy_static = "1.4.0"
|
||||
|
|
Loading…
Reference in New Issue