diff --git a/Cargo.lock b/Cargo.lock index 82a2f51a41cc7cd08ffea96f67c53319a42b9ac5..9f89e471d401ecf9e0d9a07d87b9b0789b695a72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5262,7 +5262,6 @@ dependencies = [ "frame-system", "pallet-authority-members", "pallet-authorship", - "pallet-certification", "pallet-identity", "pallet-membership", "pallet-session", diff --git a/end2end-tests/README.md b/end2end-tests/README.md index b5f21c0c2013e983c6566a804a558899a1735984..79da56e7fded4010bf8fd29abdc05109db261538 100644 --- a/end2end-tests/README.md +++ b/end2end-tests/README.md @@ -163,7 +163,7 @@ To work, the integration tests need to have the runtime metadata up to date, her them: ```bash -subxt metadata -f bytes > resources/metadata.scale +subxt metadata -f bytes --version 14 > resources/metadata.scale ``` If you don't have subxt, install it: `cargo install subxt-cli` diff --git a/pallets/distance/Cargo.toml b/pallets/distance/Cargo.toml index 47f1f67105a70867e2ab8494eb6bdfd7ed0cc506..56226bf77eb34459f716c51e18332001838d5352 100644 --- a/pallets/distance/Cargo.toml +++ b/pallets/distance/Cargo.toml @@ -16,7 +16,6 @@ std = [ 'frame-support/std', 'pallet-authority-members/std', 'pallet-authorship/std', - 'pallet-certification/std', 'pallet-identity/std', 'pallet-membership/std', 'pallet-session/std', @@ -29,7 +28,6 @@ std = [ [dependencies] pallet-authority-members = { path = "../authority-members", default-features = false } -pallet-certification = { path = "../certification", default-features = false } pallet-identity = { path = "../identity", default-features = false } pallet-membership = { path = "../membership", default-features = false } sp-distance = { path = "../../primitives/distance", default-features = false } diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs index c56e35d60385c71fa631b20be7283b953ffc6ef5..45ee644be46120edc2ea2c1dac8c5dc8864a09f8 100644 --- a/pallets/distance/src/lib.rs +++ b/pallets/distance/src/lib.rs @@ -51,12 +51,11 @@ pub mod pallet { #[pallet::generate_store(pub(super) trait Store)] #[pallet::storage_version(STORAGE_VERSION)] #[pallet::without_storage_info] - pub struct Pallet<T, I = ()>(PhantomData<(T, I)>); + pub struct Pallet<T>(PhantomData<T>); #[pallet::config] - pub trait Config<I: 'static = ()>: + pub trait Config: frame_system::Config + pallet_authorship::Config - + pallet_certification::Config<I, IdtyIndex = IdtyIndex> + pallet_identity::Config<IdtyIndex = IdtyIndex> + pallet_session::Config { @@ -77,40 +76,40 @@ pub mod pallet { /// Identities queued for distance evaluation #[pallet::storage] #[pallet::getter(fn evaluation_pool_0)] - pub type EvaluationPool0<T: Config<I>, I: 'static = ()> = StorageValue< + pub type EvaluationPool0<T: Config> = StorageValue< _, EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, >, ValueQuery, >; /// Identities queued for distance evaluation #[pallet::storage] #[pallet::getter(fn evaluation_pool_1)] - pub type EvaluationPool1<T: Config<I>, I: 'static = ()> = StorageValue< + pub type EvaluationPool1<T: Config> = StorageValue< _, EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, >, ValueQuery, >; /// Identities queued for distance evaluation #[pallet::storage] #[pallet::getter(fn evaluation_pool_2)] - pub type EvaluationPool2<T: Config<I>, I: 'static = ()> = StorageValue< + pub type EvaluationPool2<T: Config> = StorageValue< _, EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, >, ValueQuery, >; /// Block for which the distance rule must be checked #[pallet::storage] - pub type EvaluationBlock<T: Config<I>, I: 'static = ()> = + pub type EvaluationBlock<T: Config> = StorageValue<_, <T as frame_system::Config>::Hash, ValueQuery>; /// Distance evaluation status by identity @@ -120,10 +119,10 @@ pub mod pallet { /// * `.1` is the status of the evaluation. #[pallet::storage] #[pallet::getter(fn identity_distance_status)] - pub type IdentityDistanceStatus<T: Config<I>, I: 'static = ()> = StorageMap< + pub type IdentityDistanceStatus<T: Config> = StorageMap< _, Twox64Concat, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, (<T as frame_system::Config>::AccountId, DistanceStatus), OptionQuery, >; @@ -131,12 +130,12 @@ pub mod pallet { /// Identities by distance status expiration session index #[pallet::storage] #[pallet::getter(fn distance_status_expire_on)] - pub type DistanceStatusExpireOn<T: Config<I>, I: 'static = ()> = StorageMap< + pub type DistanceStatusExpireOn<T: Config> = StorageMap< _, Twox64Concat, u32, BoundedVec< - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, ConstU32<MAX_EVALUATIONS_PER_SESSION>, >, ValueQuery, @@ -144,7 +143,7 @@ pub mod pallet { /// Did evaluation get updated in this block? #[pallet::storage] - pub(super) type DidUpdate<T: Config<I>, I: 'static = ()> = StorageValue<_, bool, ValueQuery>; + pub(super) type DidUpdate<T: Config> = StorageValue<_, bool, ValueQuery>; // session_index % 3: // storage_id + 0 => pending @@ -155,7 +154,7 @@ pub mod pallet { // ERRORS // #[pallet::error] - pub enum Error<T, I = ()> { + pub enum Error<T> { AlreadyInEvaluation, CannotReserve, ManyEvaluationsByAuthor, @@ -169,7 +168,7 @@ pub mod pallet { } #[pallet::hooks] - impl<T: Config<I>, I: 'static> Hooks<BlockNumberFor<T>> for Pallet<T, I> { + impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { /// dummy `on_initialize` to return the weight used in `on_finalize`. fn on_initialize(_n: BlockNumberFor<T>) -> Weight { // weight of `on_finalize` @@ -182,28 +181,28 @@ pub mod pallet { /// - 1 storage deletion (codec `O(1)`). /// # </weight> fn on_finalize(_n: BlockNumberFor<T>) { - DidUpdate::<T, I>::take(); + DidUpdate::<T>::take(); } } // CALLS // #[pallet::call] - impl<T: Config<I>, I: 'static> Pallet<T, I> { + impl<T: Config> Pallet<T> { /// Request an identity to be evaluated #[pallet::weight(1_000_000_000)] pub fn request_distance_evaluation(origin: OriginFor<T>) -> DispatchResultWithPostInfo { let who = ensure_signed(origin)?; - let idty = pallet_identity::IdentityIndexOf::<T>::get(&who) - .ok_or(Error::<T, I>::NoIdentity)?; + let idty = + pallet_identity::IdentityIndexOf::<T>::get(&who).ok_or(Error::<T>::NoIdentity)?; ensure!( - IdentityDistanceStatus::<T, I>::get(idty).is_none(), - Error::<T, I>::AlreadyInEvaluation + IdentityDistanceStatus::<T>::get(idty).is_none(), + Error::<T>::AlreadyInEvaluation ); - Pallet::<T, I>::do_request_distance_evaluation(who, idty)?; + Pallet::<T>::do_request_distance_evaluation(who, idty)?; Ok(().into()) } @@ -215,14 +214,14 @@ pub mod pallet { ) -> DispatchResult { ensure_none(origin)?; ensure!( - !DidUpdate::<T, I>::exists(), - Error::<T, I>::ManyEvaluationsInBlock, + !DidUpdate::<T>::exists(), + Error::<T>::ManyEvaluationsInBlock, ); - let author = pallet_authorship::Pallet::<T>::author().ok_or(Error::<T, I>::NoAuthor)?; + let author = pallet_authorship::Pallet::<T>::author().ok_or(Error::<T>::NoAuthor)?; - Pallet::<T, I>::do_update_evaluation(author, computation_result)?; + Pallet::<T>::do_update_evaluation(author, computation_result)?; - DidUpdate::<T, I>::set(true); + DidUpdate::<T>::set(true); Ok(()) } @@ -235,7 +234,7 @@ pub mod pallet { ) -> DispatchResult { ensure_root(origin)?; - Pallet::<T, I>::do_update_evaluation(evaluator, computation_result) + Pallet::<T>::do_update_evaluation(evaluator, computation_result) } /// Set the distance evaluation status of an identity @@ -248,18 +247,18 @@ pub mod pallet { #[pallet::weight(1_000_000)] pub fn force_set_distance_status( origin: OriginFor<T>, - identity: <T as pallet_certification::Config<I>>::IdtyIndex, + identity: <T as pallet_identity::Config>::IdtyIndex, status: Option<(<T as frame_system::Config>::AccountId, DistanceStatus)>, ) -> DispatchResult { ensure_root(origin)?; - IdentityDistanceStatus::<T, I>::set(identity, status); - DistanceStatusExpireOn::<T, I>::mutate( + IdentityDistanceStatus::<T>::set(identity, status); + DistanceStatusExpireOn::<T>::mutate( pallet_session::CurrentIndex::<T>::get() + T::ResultExpiration::get(), move |identities| { identities .try_push(identity) - .map_err(|_| Error::<T, I>::ManyEvaluationsInBlock.into()) + .map_err(|_| Error::<T>::ManyEvaluationsInBlock.into()) }, ) } @@ -267,7 +266,7 @@ pub mod pallet { // INTERNAL FUNCTIONS // - impl<T: Config<I>, I: 'static> Pallet<T, I> { + impl<T: Config> Pallet<T> { /// Mutate the evaluation pool containing: /// * when this session begins: the evaluation results to be applied /// * when this session ends: the evaluation requests @@ -276,7 +275,7 @@ pub mod pallet { F: FnOnce( &mut EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, >, ) -> R, >( @@ -284,9 +283,9 @@ pub mod pallet { f: F, ) -> R { match index % 3 { - 0 => EvaluationPool2::<T, I>::mutate(f), - 1 => EvaluationPool0::<T, I>::mutate(f), - 2 => EvaluationPool1::<T, I>::mutate(f), + 0 => EvaluationPool2::<T>::mutate(f), + 1 => EvaluationPool0::<T>::mutate(f), + 2 => EvaluationPool1::<T>::mutate(f), _ => unreachable!("index % 3 < 3"), } } @@ -296,7 +295,7 @@ pub mod pallet { F: FnOnce( &mut EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, >, ) -> R, >( @@ -304,9 +303,9 @@ pub mod pallet { f: F, ) -> R { match index % 3 { - 0 => EvaluationPool0::<T, I>::mutate(f), - 1 => EvaluationPool1::<T, I>::mutate(f), - 2 => EvaluationPool2::<T, I>::mutate(f), + 0 => EvaluationPool0::<T>::mutate(f), + 1 => EvaluationPool1::<T>::mutate(f), + 2 => EvaluationPool2::<T>::mutate(f), _ => unreachable!("index % 3 < 3"), } } @@ -319,41 +318,38 @@ pub mod pallet { index: SessionIndex, ) -> EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, + <T as pallet_identity::Config>::IdtyIndex, > { match index % 3 { - 0 => EvaluationPool2::<T, I>::take(), - 1 => EvaluationPool0::<T, I>::take(), - 2 => EvaluationPool1::<T, I>::take(), + 0 => EvaluationPool2::<T>::take(), + 1 => EvaluationPool0::<T>::take(), + 2 => EvaluationPool1::<T>::take(), _ => unreachable!("index % 3 < 3"), } } fn do_request_distance_evaluation( who: T::AccountId, - idty_index: <T as pallet_certification::Config<I>>::IdtyIndex, + idty_index: <T as pallet_identity::Config>::IdtyIndex, ) -> Result<(), DispatchError> { - Pallet::<T, I>::mutate_current_pool( + Pallet::<T>::mutate_current_pool( pallet_session::CurrentIndex::<T>::get(), |current_pool| { ensure!( current_pool.evaluations.len() < (MAX_EVALUATIONS_PER_SESSION as usize), - Error::<T, I>::QueueFull + Error::<T>::QueueFull ); - T::Currency::reserve(&who, <T as Config<I>>::EvaluationPrice::get())?; + T::Currency::reserve(&who, <T as Config>::EvaluationPrice::get())?; current_pool .evaluations .try_push((idty_index, median::MedianAcc::new())) - .map_err(|_| Error::<T, I>::QueueFull)?; + .map_err(|_| Error::<T>::QueueFull)?; - IdentityDistanceStatus::<T, I>::insert( - idty_index, - (who, DistanceStatus::Pending), - ); + IdentityDistanceStatus::<T>::insert(idty_index, (who, DistanceStatus::Pending)); - DistanceStatusExpireOn::<T, I>::mutate( + DistanceStatusExpireOn::<T>::mutate( pallet_session::CurrentIndex::<T>::get() + T::ResultExpiration::get(), move |identities| identities.try_push(idty_index).ok(), ); @@ -367,50 +363,47 @@ pub mod pallet { evaluator: <T as frame_system::Config>::AccountId, computation_result: ComputationResult, ) -> DispatchResult { - Pallet::<T, I>::mutate_next_pool( - pallet_session::CurrentIndex::<T>::get(), - |result_pool| { - ensure!( - computation_result.distances.len() == result_pool.evaluations.len(), - Error::<T, I>::WrongResultLength - ); - - if result_pool - .evaluators - .try_insert(evaluator) - .map_err(|_| Error::<T, I>::TooManyEvaluators)? + Pallet::<T>::mutate_next_pool(pallet_session::CurrentIndex::<T>::get(), |result_pool| { + ensure!( + computation_result.distances.len() == result_pool.evaluations.len(), + Error::<T>::WrongResultLength + ); + + if result_pool + .evaluators + .try_insert(evaluator) + .map_err(|_| Error::<T>::TooManyEvaluators)? + { + for (distance_value, (_identity, median_acc)) in computation_result + .distances + .into_iter() + .zip(result_pool.evaluations.iter_mut()) { - for (distance_value, (_identity, median_acc)) in computation_result - .distances - .into_iter() - .zip(result_pool.evaluations.iter_mut()) - { - median_acc.push(distance_value); - } - - Ok(()) - } else { - Err(Error::<T, I>::ManyEvaluationsByAuthor.into()) + median_acc.push(distance_value); } - }, - ) + + Ok(()) + } else { + Err(Error::<T>::ManyEvaluationsByAuthor.into()) + } + }) } } - impl<T: Config<I>, I: 'static> pallet_authority_members::OnNewSession for Pallet<T, I> { + impl<T: Config> pallet_authority_members::OnNewSession for Pallet<T> { fn on_new_session(index: SessionIndex) -> Weight { - EvaluationBlock::<T, I>::set(frame_system::Pallet::<T>::parent_hash()); + EvaluationBlock::<T>::set(frame_system::Pallet::<T>::parent_hash()); // Make results expire - DistanceStatusExpireOn::<T, I>::remove(index); + DistanceStatusExpireOn::<T>::remove(index); // Apply the results from the current pool (which was previous session's result pool) // We take the results so the pool is left empty for the new session. #[allow(clippy::type_complexity)] let current_pool: EvaluationPool< <T as frame_system::Config>::AccountId, - <T as pallet_certification::Config<I>>::IdtyIndex, - > = Pallet::<T, I>::take_current_pool(index); + <T as pallet_identity::Config>::IdtyIndex, + > = Pallet::<T>::take_current_pool(index); for (idty, median_acc) in current_pool.evaluations.into_iter() { if let Some(median_result) = median_acc.get_median() { let median = match median_result { @@ -418,29 +411,28 @@ pub mod pallet { MedianResult::Two(m1, m2) => m1 + (m2 - m1) / 2, // Avoid overflow (since max is 1) }; if median >= T::MinAccessibleReferees::get() { - IdentityDistanceStatus::<T, I>::mutate(idty, |entry| { + IdentityDistanceStatus::<T>::mutate(idty, |entry| { entry.as_mut().map(|(account_id, status)| { T::Currency::unreserve( account_id, - <T as Config<I>>::EvaluationPrice::get(), + <T as Config>::EvaluationPrice::get(), ); *status = DistanceStatus::Valid; }) }); } else if let Some((account_id, _status)) = - IdentityDistanceStatus::<T, I>::take(idty) + IdentityDistanceStatus::<T>::take(idty) { - <T as Config<I>>::Currency::slash_reserved( + <T as Config>::Currency::slash_reserved( &account_id, - <T as Config<I>>::EvaluationPrice::get(), + <T as Config>::EvaluationPrice::get(), ); } - } else if let Some((account_id, _status)) = - IdentityDistanceStatus::<T, I>::take(idty) + } else if let Some((account_id, _status)) = IdentityDistanceStatus::<T>::take(idty) { - <T as Config<I>>::Currency::unreserve( + <T as Config>::Currency::unreserve( &account_id, - <T as Config<I>>::EvaluationPrice::get(), + <T as Config>::EvaluationPrice::get(), ); } } @@ -449,8 +441,8 @@ pub mod pallet { } #[pallet::inherent] - impl<T: Config<I>, I: 'static> ProvideInherent for Pallet<T, I> { - type Call = Call<T, I>; + impl<T: Config> ProvideInherent for Pallet<T> { + type Call = Call<T>; type Error = InherentError; const INHERENT_IDENTIFIER: InherentIdentifier = INHERENT_IDENTIFIER; diff --git a/pallets/distance/src/traits.rs b/pallets/distance/src/traits.rs index 4d34c5de0f78c7bc5289be0633661c07d678e38d..de9d532d64f4ce64a16fd20fab28455523f18e69 100644 --- a/pallets/distance/src/traits.rs +++ b/pallets/distance/src/traits.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. -pub trait HandleNegativeEvaluation<T: crate::Config<I>, I: 'static> { +pub trait HandleNegativeEvaluation<T: crate::Config> { /// Do something with the reserved amount on the account, /// when distance evaluation result is negative. fn handle_negative_evaluation(account_id: T::AccountId); diff --git a/resources/metadata.scale b/resources/metadata.scale index d90bf7356f6d8550b1fd195e26baaf03f741875d..11d3bc5da37cff7bbbecf45c200e1d612b5caff4 100644 Binary files a/resources/metadata.scale and b/resources/metadata.scale differ diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index e573fec14cdf4e8b5f9bc92dc3afaa3086adb556..e05a97d4fd88fbb2be9f359cee76934b324ff7b4 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -28,11 +28,11 @@ use sp_runtime::traits::IsMember; pub struct OnNewSessionHandler<Runtime>(core::marker::PhantomData<Runtime>); impl<Runtime> pallet_authority_members::traits::OnNewSession for OnNewSessionHandler<Runtime> where - Runtime: pallet_provide_randomness::Config + pallet_distance::Config<Instance1>, + Runtime: pallet_provide_randomness::Config + pallet_distance::Config, { fn on_new_session(index: sp_staking::SessionIndex) -> Weight { pallet_provide_randomness::Pallet::<Runtime>::on_new_epoch(); - pallet_distance::Pallet::<Runtime, Instance1>::on_new_session(index) + pallet_distance::Pallet::<Runtime>::on_new_session(index) } } diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 6a8cede3b2fa2f3f7b6ca70ca8c1f1eb3df774bd..74093f6b791a008d9b0939b3654a2cb048f4d4f5 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -430,7 +430,7 @@ macro_rules! pallets_config { use frame_support::instances::Instance1; impl pallet_duniter_wot::Config<Instance1> for Runtime { type FirstIssuableOn = WotFirstCertIssuableOn; - type IsDistanceOk = common_runtime::providers::MainWotIsDistanceOk<Runtime, Instance1>; + type IsDistanceOk = common_runtime::providers::MainWotIsDistanceOk<Runtime>; type IsSubWot = frame_support::traits::ConstBool<false>; type MinCertForMembership = WotMinCertForMembership; type MinCertForCreateIdtyRight = WotMinCertForCreateIdtyRight; @@ -484,7 +484,7 @@ macro_rules! pallets_config { parameter_types! { pub const MinAccessibleReferees: Perbill = Perbill::from_percent(80); } - impl pallet_distance::Config<Instance1> for Runtime { + impl pallet_distance::Config for Runtime { type Currency = Balances; type EvaluationPrice = frame_support::traits::ConstU64<1000>; type MinAccessibleReferees = MinAccessibleReferees; diff --git a/runtime/common/src/providers.rs b/runtime/common/src/providers.rs index cab5f76fa55cb9a623db44255cfec0c96d4c16db..151f70ece87da144afce3ebca0f12f04ecba6b3e 100644 --- a/runtime/common/src/providers.rs +++ b/runtime/common/src/providers.rs @@ -107,18 +107,16 @@ where } } -pub struct MainWotIsDistanceOk<T, I>(PhantomData<(T, I)>); +pub struct MainWotIsDistanceOk<T>(PhantomData<T>); -impl<T, I> - pallet_duniter_wot::traits::IsDistanceOk<<T as pallet_certification::Config<I>>::IdtyIndex> - for MainWotIsDistanceOk<T, I> +impl<T> pallet_duniter_wot::traits::IsDistanceOk<<T as pallet_identity::Config>::IdtyIndex> + for MainWotIsDistanceOk<T> where - T: pallet_distance::Config<I>, - I: 'static, + T: pallet_distance::Config, { - fn is_distance_ok(idty_id: &<T as pallet_certification::Config<I>>::IdtyIndex) -> bool { + fn is_distance_ok(idty_id: &<T as pallet_identity::Config>::IdtyIndex) -> bool { matches!( - pallet_distance::Pallet::<T, I>::identity_distance_status(idty_id), + pallet_distance::Pallet::<T>::identity_distance_status(idty_id), Some((_, pallet_distance::DistanceStatus::Valid)) ) } diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index a2b24627b28cb926f580ecfbca120c5f9fae6e8f..8fc21691c6326b084b6fe61096d683033d31f0ef 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -277,7 +277,7 @@ construct_runtime!( Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>} = 41, Membership: pallet_membership::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>} = 42, Cert: pallet_certification::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>} = 43, - Distance: pallet_distance::<Instance1>::{Pallet, Call, Storage, Inherent} = 44, + Distance: pallet_distance::{Pallet, Call, Storage, Inherent} = 44, // Smith Sub-Wot SmithSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50, diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index 57553149ea7d99726dc2b0673373f31f3212b331..67d2dde35a90468bf10781d802e37d368aeb4ad4 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -333,7 +333,7 @@ construct_runtime!( Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>} = 41, Membership: pallet_membership::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>} = 42, Cert: pallet_certification::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>} = 43, - Distance: pallet_distance::<Instance1>::{Pallet, Call, Storage, Inherent} = 44, + Distance: pallet_distance::{Pallet, Call, Storage, Inherent} = 44, // Smith Sub-Wot SmithSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50, diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index 549fb4268b7b813f4ebfefc883ab7142b0fecb6d..9722455c45cdc3c48ceaba0dc9128b31cbc89a8b 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -293,7 +293,7 @@ construct_runtime!( Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>} = 41, Membership: pallet_membership::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>} = 42, Cert: pallet_certification::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>} = 43, - Distance: pallet_distance::<Instance1>::{Pallet, Call, Storage, Inherent} = 44, + Distance: pallet_distance::{Pallet, Call, Storage, Inherent} = 44, // Smith Sub-Wot SmithSubWot: pallet_duniter_wot::<Instance2>::{Pallet} = 50,