chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -63,7 +63,8 @@ pub fn display_and_check_bags<Runtime: RuntimeT<Instance1>>(
let mut seen_in_bags = 0;
let mut rebaggable = 0;
let mut active_bags = 0;
for vote_weight_thresh in <Runtime as pezpallet_bags_list::Config<Instance1>>::BagThresholds::get()
for vote_weight_thresh in
<Runtime as pezpallet_bags_list::Config<Instance1>>::BagThresholds::get()
{
let vote_weight_thresh_u64: u64 = (*vote_weight_thresh)
.try_into()
@@ -19,8 +19,8 @@
use crate::{RuntimeT, LOG_TARGET};
use pezframe_support::traits::PalletInfoAccess;
use pezpallet_staking::Nominators;
use remote_externalities::{Builder, Mode, OnlineConfig};
use pezsp_runtime::{traits::Block as BlockT, DeserializeOwned};
use remote_externalities::{Builder, Mode, OnlineConfig};
/// Test voter bags migration. `currency_unit` is the number of planks per the the runtimes `UNITS`
/// (i.e. number of decimal places per HEZ, KSM etc)
@@ -56,7 +56,8 @@ pub async fn execute<Runtime, Block>(
);
log::info!(target: LOG_TARGET, "Moved {} nominators", moved);
let voter_list_len = <Runtime as pezpallet_staking::Config>::VoterList::iter().count() as u32;
let voter_list_len =
<Runtime as pezpallet_staking::Config>::VoterList::iter().count() as u32;
let voter_list_count = <Runtime as pezpallet_staking::Config>::VoterList::count();
// and confirm it is equal to the length of the `VoterList`.
assert_eq!(pre_migrate_nominator_count, voter_list_len);
@@ -21,11 +21,11 @@ use pezframe_election_provider_support::{
SortedListProvider,
};
use pezframe_support::traits::PalletInfoAccess;
use remote_externalities::{Builder, Mode, OnlineConfig};
use pezsp_runtime::{
traits::{Block as BlockT, Zero},
DeserializeOwned,
};
use remote_externalities::{Builder, Mode, OnlineConfig};
/// Execute create a snapshot from pezpallet-staking.
pub async fn execute<Runtime, Block>(voter_limit: Option<usize>, currency_unit: u64, ws_url: String)
@@ -39,10 +39,12 @@ where
let mut ext = Builder::<Block>::new()
.mode(Mode::Online(OnlineConfig {
transport: ws_url.to_string().into(),
// NOTE: we don't scrape pezpallet-staking, this kinda ensures that the source of the data
// is bags-list.
pallets: vec![pezpallet_bags_list::Pezpallet::<Runtime, pezpallet_bags_list::Instance1>::name()
.to_string()],
// NOTE: we don't scrape pezpallet-staking, this kinda ensures that the source of the
// data is bags-list.
pallets: vec![
pezpallet_bags_list::Pezpallet::<Runtime, pezpallet_bags_list::Instance1>::name()
.to_string(),
],
at: None,
hashed_prefixes: vec![
<pezpallet_staking::Bonded<Runtime>>::prefix_hash().to_vec(),
@@ -20,8 +20,8 @@ use pezframe_support::{
storage::generator::StorageMap,
traits::{Get, PalletInfoAccess},
};
use remote_externalities::{Builder, Mode, OnlineConfig};
use pezsp_runtime::{traits::Block as BlockT, DeserializeOwned};
use remote_externalities::{Builder, Mode, OnlineConfig};
/// Execute the sanity check of the bags-list.
pub async fn execute<Runtime, Block>(
@@ -36,8 +36,10 @@ pub async fn execute<Runtime, Block>(
let mut ext = Builder::<Block>::new()
.mode(Mode::Online(OnlineConfig {
transport: ws_url.to_string().into(),
pallets: vec![pezpallet_bags_list::Pezpallet::<Runtime, pezpallet_bags_list::Instance1>::name()
.to_string()],
pallets: vec![
pezpallet_bags_list::Pezpallet::<Runtime, pezpallet_bags_list::Instance1>::name()
.to_string(),
],
hashed_prefixes: vec![
<pezpallet_staking::Bonded<Runtime>>::prefix_hash().to_vec(),
<pezpallet_staking::Ledger<Runtime>>::prefix_hash().to_vec(),
@@ -49,9 +51,12 @@ pub async fn execute<Runtime, Block>(
.unwrap();
ext.execute_with(|| {
pezsp_core::crypto::set_default_ss58_version(Runtime::SS58Prefix::get().try_into().unwrap());
pezsp_core::crypto::set_default_ss58_version(
Runtime::SS58Prefix::get().try_into().unwrap(),
);
pezpallet_bags_list::Pezpallet::<Runtime, pezpallet_bags_list::Instance1>::do_try_state().unwrap();
pezpallet_bags_list::Pezpallet::<Runtime, pezpallet_bags_list::Instance1>::do_try_state()
.unwrap();
log::info!(target: crate::LOG_TARGET, "executed bags-list sanity check with no errors.");