Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
326 changes: 163 additions & 163 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions runtime/common/src/elections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions utils/remote-ext-tests/bags-list/src/voter_bags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
Expand Down