Updated all dependencies.
This commit is contained in:
Generated
+341
-218
File diff suppressed because it is too large
Load Diff
+16
-16
@@ -11,35 +11,35 @@ exclude = ["blockchain.db", "alfis.toml"]
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
getopts = "0.2.21"
|
||||
log = "0.4.22"
|
||||
getopts = "0.2.24"
|
||||
log = "0.4.28"
|
||||
simplelog = "0.12.2"
|
||||
toml = "0.8.19"
|
||||
sha2 = "0.10.8"
|
||||
ed25519-dalek = "2.1.1"
|
||||
toml = "0.9.8"
|
||||
sha2 = "0.10.9"
|
||||
ed25519-dalek = "2.2.0"
|
||||
x25519-dalek = { version = "2.0.1", features = ["reusable_secrets"] }
|
||||
ecies-ed25519-ng = { git = "https://github.com/Revertron/ecies-ed25519-ng", rev = "554ca29", version = "0.5.3" }
|
||||
chacha20poly1305 = "0.10.1"
|
||||
blakeout = "0.3.0"
|
||||
num_cpus = "1.16.0"
|
||||
num_cpus = "1.17.0"
|
||||
byteorder = "1.5.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
bincode = "1.3.3"
|
||||
bincode = { version = "2.0.1", features = ["serde"] }
|
||||
serde_cbor = "0.11.2"
|
||||
num-bigint = "0.4.6"
|
||||
chrono = { version = "0.4.38", features = ["serde"] }
|
||||
time = "0.3.36"
|
||||
chrono = { version = "0.4.42", features = ["serde"] }
|
||||
time = "0.3.44"
|
||||
rand = { package = "rand", version = "0.8.5" }
|
||||
sqlite = "0.36.0"
|
||||
uuid = { version = "1.11.0", features = ["serde", "v4"] }
|
||||
sqlite = "0.37.0"
|
||||
uuid = { version = "1.18.1", features = ["serde", "v4"] }
|
||||
mio = { version = "1.0.0", features = ["os-poll", "net"] }
|
||||
ureq = { version = "3.0.10", optional = true }
|
||||
lru = "0.12"
|
||||
derive_more = { version = "1.0.0", features = ["display", "error", "from"] }
|
||||
ureq = { version = "3.1.2", optional = true }
|
||||
lru = "0.16.2"
|
||||
derive_more = { version = "2.0.1", features = ["display", "error", "from"] }
|
||||
lazy_static = "1.5.0"
|
||||
spmc = "0.3.0"
|
||||
thread-priority = "1.2.0"
|
||||
thread-priority = "3.0.0"
|
||||
|
||||
# Optional dependencies regulated by features
|
||||
web-view = { git = "https://github.com/Boscop/web-view", features = [], optional = true }
|
||||
@@ -48,7 +48,7 @@ open = { version = "5.3.0", optional = true }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = { version = "0.3.9", features = ["impl-default", "wincon", "shellscalingapi"] }
|
||||
windows-service = "0.7.0"
|
||||
windows-service = "0.8.0"
|
||||
|
||||
[build-dependencies]
|
||||
winres = "0.1.12"
|
||||
|
||||
@@ -3,7 +3,7 @@ extern crate serde_json;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::fmt::Debug;
|
||||
|
||||
use bincode::config;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::blockchain::hash_utils::{hash_difficulty, key_hash_difficulty};
|
||||
@@ -94,7 +94,7 @@ impl Block {
|
||||
|
||||
/// Serializes block to bincode format for hashing.
|
||||
pub fn as_bytes_compact(&self) -> Vec<u8> {
|
||||
bincode::serialize(&self).unwrap()
|
||||
bincode::serde::encode_to_vec(&self, config::legacy()).unwrap()
|
||||
}
|
||||
|
||||
/// Checks if this block is superior to the other
|
||||
|
||||
@@ -15,9 +15,14 @@ pub struct Chacha {
|
||||
|
||||
impl Chacha {
|
||||
pub fn new(key: &[u8], nonce: &[u8]) -> Self {
|
||||
let key = Key::from_slice(key);
|
||||
let cipher = ChaCha20Poly1305::new(key);
|
||||
let nonce = Nonce::clone_from_slice(nonce);
|
||||
// Convert slices to fixed-size arrays, then to GenericArray
|
||||
let key_array: [u8; 32] = key.try_into().expect("Key must be 32 bytes");
|
||||
let key = Key::from(key_array);
|
||||
let cipher = ChaCha20Poly1305::new(&key);
|
||||
|
||||
let nonce_array: [u8; 12] = nonce.try_into().expect("Nonce must be 12 bytes");
|
||||
let nonce = Nonce::from(nonce_array);
|
||||
|
||||
Chacha { cipher, nonce }
|
||||
}
|
||||
|
||||
@@ -30,7 +35,7 @@ impl Chacha {
|
||||
}
|
||||
|
||||
pub fn get_nonce(&self) -> &[u8] {
|
||||
&self.nonce.as_slice()
|
||||
self.nonce.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -243,7 +243,7 @@ mod tests {
|
||||
}));
|
||||
|
||||
match Arc::get_mut(&mut context) {
|
||||
Some(mut ctx) => {
|
||||
Some(ctx) => {
|
||||
ctx.resolve_strategy = ResolveStrategy::Forward { upstreams: vec![String::from("127.0.0.1:53")] };
|
||||
}
|
||||
None => panic!()
|
||||
|
||||
Reference in New Issue
Block a user