mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
* fix renames * fix test * cargo update -p sp-io * bump implement version * bumpd spec version, to be safe * bump version correctly Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a425f3fa9a
commit
a3c60b245f
Generated
+163
-163
File diff suppressed because it is too large
Load Diff
@@ -128,19 +128,19 @@ impl<T: pallet_bags_list::Config + pallet_staking::Config> SortedListProvider<T:
|
||||
pallet_bags_list::Pallet::<T>::on_remove(id);
|
||||
}
|
||||
|
||||
fn regenerate(
|
||||
fn unsafe_regenerate(
|
||||
all: impl IntoIterator<Item = T::AccountId>,
|
||||
weight_of: Box<dyn Fn(&T::AccountId) -> VoteWeight>,
|
||||
) -> u32 {
|
||||
pallet_bags_list::Pallet::<T>::regenerate(all, weight_of)
|
||||
pallet_bags_list::Pallet::<T>::unsafe_regenerate(all, weight_of)
|
||||
}
|
||||
|
||||
fn sanity_check() -> Result<(), &'static str> {
|
||||
pallet_bags_list::Pallet::<T>::sanity_check()
|
||||
}
|
||||
|
||||
fn clear(count: Option<u32>) -> u32 {
|
||||
pallet_bags_list::Pallet::<T>::clear(count)
|
||||
fn unsafe_clear() {
|
||||
pallet_bags_list::Pallet::<T>::unsafe_clear()
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
@@ -119,7 +119,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("kusama"),
|
||||
impl_name: create_runtime_str!("parity-kusama"),
|
||||
authoring_version: 2,
|
||||
spec_version: 9130,
|
||||
spec_version: 9140,
|
||||
impl_version: 0,
|
||||
#[cfg(not(feature = "disable-runtime-api"))]
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
|
||||
@@ -118,7 +118,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("polkadot"),
|
||||
impl_name: create_runtime_str!("parity-polkadot"),
|
||||
authoring_version: 0,
|
||||
spec_version: 9130,
|
||||
spec_version: 9140,
|
||||
impl_version: 0,
|
||||
#[cfg(not(feature = "disable-runtime-api"))]
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
|
||||
@@ -107,7 +107,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("rococo"),
|
||||
impl_name: create_runtime_str!("parity-rococo-v2.0"),
|
||||
authoring_version: 0,
|
||||
spec_version: 9130,
|
||||
spec_version: 9140,
|
||||
impl_version: 0,
|
||||
#[cfg(not(feature = "disable-runtime-api"))]
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
|
||||
@@ -119,7 +119,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("westend"),
|
||||
impl_name: create_runtime_str!("parity-westend"),
|
||||
authoring_version: 2,
|
||||
spec_version: 9130,
|
||||
spec_version: 9140,
|
||||
impl_version: 0,
|
||||
#[cfg(not(feature = "disable-runtime-api"))]
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
|
||||
@@ -61,14 +61,14 @@ pub(crate) async fn test_voter_bags_migration<
|
||||
"some data already seem to exist in the bags-list pallet.."
|
||||
);
|
||||
}
|
||||
<Runtime as pallet_staking::Config>::SortedListProvider::clear(None);
|
||||
<Runtime as pallet_staking::Config>::SortedListProvider::unsafe_clear();
|
||||
|
||||
// get the nominator & validator count prior to migrating; these should be invariant.
|
||||
let pre_migrate_nominator_count = <Nominators<Runtime>>::iter().count() as u32;
|
||||
log::info!(target: LOG_TARGET, "Nominator count: {}", pre_migrate_nominator_count);
|
||||
|
||||
// run the actual migration,
|
||||
let moved = <Runtime as pallet_staking::Config>::SortedListProvider::regenerate(
|
||||
let moved = <Runtime as pallet_staking::Config>::SortedListProvider::unsafe_regenerate(
|
||||
pallet_staking::Nominators::<Runtime>::iter().map(|(n, _)| n),
|
||||
pallet_staking::Pallet::<Runtime>::weight_of_fn(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user