make benchmark work, issue with authorities fixed
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
1196cc9faa
commit
3040dfb775
@ -50,8 +50,8 @@ benchmarks! {
|
|||||||
|
|
||||||
self_applause {
|
self_applause {
|
||||||
let session_index = T::ValidatorSet::session_index();
|
let session_index = T::ValidatorSet::session_index();
|
||||||
let authority = T::AuthorityId::generate_pair(Some(vec![69u8]));
|
let authorities = vec![T::AuthorityId::generate_pair(None)];
|
||||||
let bounded_authorities = WeakBoundedVec::<_, T::MaxAuthorities>::try_from(vec![authority.clone()])
|
let bounded_authorities = WeakBoundedVec::<_, T::MaxAuthorities>::try_from(authorities.clone())
|
||||||
.map_err(|()| "more than the maximum number of keys provided")?;
|
.map_err(|()| "more than the maximum number of keys provided")?;
|
||||||
Authorities::<T>::set(&session_index, bounded_authorities);
|
Authorities::<T>::set(&session_index, bounded_authorities);
|
||||||
|
|
||||||
@ -81,8 +81,11 @@ benchmarks! {
|
|||||||
amount,
|
amount,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let authority_id = authorities
|
||||||
|
.get(0usize)
|
||||||
|
.expect("first authority should exist");
|
||||||
let encoded_clap = clap.encode();
|
let encoded_clap = clap.encode();
|
||||||
let signature = authority.sign(&encoded_clap).unwrap();
|
let signature = authority_id.sign(&encoded_clap).unwrap();
|
||||||
<Pallet<T>>::slow_clap(RawOrigin::None.into(), clap, signature)?;
|
<Pallet<T>>::slow_clap(RawOrigin::None.into(), clap, signature)?;
|
||||||
<Pallet::<T>>::trigger_nullification_for_benchmark();
|
<Pallet::<T>>::trigger_nullification_for_benchmark();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user