Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix compilation problems due to ed25519-dalek 1.0.0-pre.4 (#6676)
Browse files Browse the repository at this point in the history
* Fix compilation problems due to ed25519-dalek 1.0.0-pre.4

* Update libp2p-core

* Revert rand downgrade
  • Loading branch information
tomaka authored Jul 20, 2020
1 parent 26a64d2 commit 5c43b2b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
27 changes: 22 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ parity-util-mem = { version = "0.7.0", default-features = false, features = ["pr
futures = { version = "0.3.1", optional = true }

# full crypto
ed25519-dalek = { version = "1.0.0-pre.3", default-features = false, features = ["u64_backend", "alloc"], optional = true }
ed25519-dalek = { version = "1.0.0-pre.4", default-features = false, features = ["u64_backend", "alloc"], optional = true }
blake2-rfc = { version = "0.2.18", default-features = false, optional = true }
tiny-keccak = { version = "2.0.1", features = ["keccak"], optional = true }
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false, optional = true }
Expand Down
4 changes: 3 additions & 1 deletion primitives/core/src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ use codec::{Encode, Decode};
use blake2_rfc;
#[cfg(feature = "full_crypto")]
use core::convert::TryFrom;
#[cfg(feature = "full_crypto")]
use ed25519_dalek::{Signer as _, Verifier as _};
#[cfg(feature = "std")]
use substrate_bip39::seed_from_entropy;
#[cfg(feature = "std")]
Expand Down Expand Up @@ -513,7 +515,7 @@ impl TraitPair for Pair {
Err(_) => return false,
};

let sig = match ed25519_dalek::Signature::from_bytes(sig) {
let sig = match ed25519_dalek::Signature::try_from(sig) {
Ok(s) => s,
Err(_) => return false
};
Expand Down

0 comments on commit 5c43b2b

Please sign in to comment.