Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ quickcheck = { package = "quickcheck-ext", path = "misc/quickcheck-ext" }
rand = "0.10"
rcgen = "0.13"
ring = "0.17"
sha2 = "0.11"
rw-stream-sink = { version = "0.5.0", path = "misc/rw-stream-sink" }
thiserror = "2"
tokio = { version = "1.53", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion misc/webrtc-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ prost = { workspace = true }
prost-codec = { workspace = true }
rand = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.10"
sha2 = { workspace = true }
tinytemplate = "1.2"
tracing = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ prost-codec = { workspace = true }
rand = { workspace = true }
regex = "1.13"
serde = { version = "1", optional = true, features = ["derive"] }
sha2 = "0.11"
sha2 = { workspace = true }
tracing = { workspace = true }

# Metrics dependencies
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ prost = { workspace = true }
prost-codec = { workspace = true }
libp2p-identity = { workspace = true, features = ["rand"] }
rand = { workspace = true }
sha2 = "0.10"
sha2 = { workspace = true }
smallvec = "1.15"
uint = "0.10"
futures-timer = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions protocols/kad/src/kbucket/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use libp2p_core::multihash::Multihash;
use libp2p_identity::PeerId;
use sha2::{
Digest, Sha256,
digest::generic_array::{GenericArray, typenum::U32},
digest::common::array::{Array, typenum::U32},
};
use uint::*;

Expand Down Expand Up @@ -153,7 +153,7 @@ impl<T> Hash for Key<T> {

/// The raw bytes of a key in the DHT keyspace.
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub struct KeyBytes(GenericArray<u8, U32>);
pub struct KeyBytes(Array<u8, U32>);

impl KeyBytes {
/// Creates a new key in the DHT keyspace by running the given
Expand Down Expand Up @@ -182,7 +182,7 @@ impl KeyBytes {
/// `self xor other = distance <==> other = self xor distance`
pub fn for_distance(&self, d: Distance) -> KeyBytes {
let key_int = U256::from_big_endian(self.0.as_slice()) ^ d.0;
KeyBytes(GenericArray::from(key_int.to_big_endian()))
KeyBytes(Array::from(key_int.to_big_endian()))
}
}

Expand Down
Loading