Fix compilation problems due to ed25519-dalek 1.0.0-pre.4 (#6676)

* Fix compilation problems due to ed25519-dalek 1.0.0-pre.4

* Update libp2p-core

* Revert rand downgrade
This commit is contained in:
Pierre Krieger
2020-07-20 11:53:39 +02:00
committed by GitHub
parent 7e72a658c7
commit 8ae4faba51
3 changed files with 27 additions and 8 deletions
+1 -1
View File
@@ -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 }
+3 -1
View File
@@ -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")]
@@ -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
};