mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Reduce the execution time of some tests (#10377)
* Reduce the execution time of some tests * Fix * Fix build * fmt
This commit is contained in:
@@ -301,7 +301,7 @@ mod pallet;
|
||||
|
||||
use codec::{Decode, Encode, HasCompact};
|
||||
use frame_support::{
|
||||
traits::{Currency, Get},
|
||||
traits::{ConstU32, Currency, Get},
|
||||
weights::Weight,
|
||||
};
|
||||
use scale_info::TypeInfo;
|
||||
@@ -807,3 +807,23 @@ where
|
||||
R::is_known_offence(offenders, time_slot)
|
||||
}
|
||||
}
|
||||
|
||||
/// Configurations of the benchmarking of the pallet.
|
||||
pub trait BenchmarkingConfig {
|
||||
/// The maximum number of validators to use.
|
||||
type MaxValidators: Get<u32>;
|
||||
/// The maximum number of nominators to use.
|
||||
type MaxNominators: Get<u32>;
|
||||
}
|
||||
|
||||
/// A mock benchmarking config for pallet-staking.
|
||||
///
|
||||
/// Should only be used for testing.
|
||||
#[cfg(feature = "std")]
|
||||
pub struct TestBenchmarkingConfig;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl BenchmarkingConfig for TestBenchmarkingConfig {
|
||||
type MaxValidators = ConstU32<100>;
|
||||
type MaxNominators = ConstU32<100>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user