chore: update libp2p (#103)

deps: update libp2p
This commit is contained in:
Nick 2023-05-16 19:24:03 +03:00 committed by GitHub
parent a7abe87c09
commit 412b8ba725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 308 additions and 462 deletions

764
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -6,4 +6,4 @@ members = [
] ]
[workspace.dependencies] [workspace.dependencies]
libp2p-identity = { version = "0.1.0", default-features = false, features = ["peerid", "rsa", "ed25519", "secp256k1", "multihash"] } libp2p-identity = { version = "0.1.2", default-features = false }

View File

@ -20,7 +20,7 @@ sha2 = "0.10.6"
zeroize = "1" zeroize = "1"
serde_bytes = "0.11" serde_bytes = "0.11"
eyre = "0.6.5" eyre = "0.6.5"
libp2p-identity = { workspace = true, default-features = false, features = ["peerid", "rsa", "ed25519", "secp256k1", "multihash"] } libp2p-identity = { workspace = true, default-features = false, features = ["peerid", "rsa", "ed25519", "secp256k1"] }
multihash = { version = "0.18.0", features = ["identity"] } multihash = { version = "0.18.0", features = ["identity"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View File

@ -176,7 +176,7 @@ fn as_public_key(peer_id: &PeerId) -> Option<libp2p_identity::PublicKey> {
match multihash::Code::try_from(mhash.code()) { match multihash::Code::try_from(mhash.code()) {
Ok(multihash::Code::Identity) => { Ok(multihash::Code::Identity) => {
libp2p_identity::PublicKey::from_protobuf_encoding(mhash.digest()).ok() libp2p_identity::PublicKey::try_decode_protobuf(mhash.digest()).ok()
} }
_ => None, _ => None,
} }