Skip to content
Snippets Groups Projects
Commit 0c393c08 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

wip: fix: CustomConstU32 pour TooManyEvaluators

parent 4cd72230
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,8 @@ use frame_support::{
};
use frame_system as system;
use pallet_session::{ShouldEndSession, TestSessionHandler};
use sp_core::{ConstU128, ConstU32, ConstU64, H256};
use scale_info::{Type, TypeInfo};
use sp_core::{ConstU128, ConstU32, ConstU64, Get, H256};
use sp_runtime::testing::{TestSignature, UintAuthorityId};
use sp_runtime::traits::{ConvertInto, IdentifyAccount, IsMember, Verify};
use sp_runtime::{
......@@ -113,7 +114,7 @@ impl frame_support::traits::EnsureOrigin<(RuntimeOrigin, IdtyIndex, IdtyIndex)>
}
parameter_types! {
pub const ExistentialDeposit: Balance = 10;
pub const ExistentialDeposit: Balance = 0;
pub const MaxLocks: u32 = 50;
}
......@@ -133,12 +134,20 @@ parameter_types! {
pub const MinAccessibleReferees: Perbill = Perbill::from_percent(80);
}
#[cfg_attr(feature = "std", derive(::scale_info::TypeInfo))]
pub struct CustomConstU32<const T: u32>;
impl<const T: u32> Get<u32> for CustomConstU32<T> {
fn get() -> u32 {
T
}
}
impl pallet_distance::Config for Test {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type EvaluationPrice = ConstU64<100>;
type MaxEvaluationsPerSession = ConstU32<10>;
type MaxEvaluatorsPerSession = frame_support::traits::ConstU32<100>;
type MaxEvaluatorsPerSession = CustomConstU32<100>;
type MinAccessibleReferees = MinAccessibleReferees;
type ResultExpiration = frame_support::traits::ConstU32<720>;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment