Companion for substrate #14036 (#7145)

* Companion for substrate #14036

* Rollback of some trivial renamings

* update lockfile
This commit is contained in:
Davide Galassi
2023-05-04 16:46:43 +02:00
committed by GitHub
parent 71aa0b0931
commit f6a743dadc
4 changed files with 189 additions and 189 deletions
+184 -184
View File
File diff suppressed because it is too large Load Diff
@@ -621,7 +621,7 @@ pub(crate) mod tests {
digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest},
AllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch,
};
use sp_core::{crypto::VrfSigner, testing::TaskExecutor};
use sp_core::{crypto::VrfSecret, testing::TaskExecutor};
use sp_keyring::sr25519::Keyring as Sr25519Keyring;
pub(crate) use sp_runtime::{Digest, DigestItem};
use std::{pin::Pin, sync::Arc};
@@ -704,7 +704,7 @@ pub(crate) mod tests {
// used for generating assignments where the validity of the VRF doesn't matter.
pub(crate) fn garbage_vrf_signature() -> VrfSignature {
let transcript = VrfTranscript::new(b"test-garbage", &[]);
Sr25519Keyring::Alice.pair().vrf_sign(&transcript)
Sr25519Keyring::Alice.pair().vrf_sign(&transcript.into())
}
fn dummy_session_info(index: SessionIndex) -> SessionInfo {
+1 -1
View File
@@ -169,7 +169,7 @@ impl UnsafeVRFOutput {
let pubkey = schnorrkel::PublicKey::from_bytes(author.as_slice())
.map_err(ApprovalError::SchnorrkelSignature)?;
let transcript = sp_consensus_babe::make_transcript(randomness, self.slot, epoch_index);
let transcript = sp_consensus_babe::make_vrf_transcript(randomness, self.slot, epoch_index);
let inout = self
.vrf_output
+2 -2
View File
@@ -26,7 +26,7 @@ use sp_consensus_babe::{
digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest},
VrfTranscript,
};
use sp_core::{crypto::VrfSigner, testing::TaskExecutor};
use sp_core::{crypto::VrfSecret, testing::TaskExecutor};
use sp_runtime::{testing::*, DigestItem};
use std::{
collections::{BTreeMap, HashMap, HashSet},
@@ -132,7 +132,7 @@ const TIMEOUT: Duration = Duration::from_millis(2000);
// used for generating assignments where the validity of the VRF doesn't matter.
fn garbage_vrf_signature() -> VrfSignature {
let transcript = VrfTranscript::new(b"test-garbage", &[]);
Sr25519Keyring::Alice.pair().vrf_sign(&transcript)
Sr25519Keyring::Alice.pair().vrf_sign(&transcript.into())
}
/// Representation of a local representation