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
+9 -3
View File
@@ -133,7 +133,9 @@ pub mod pezpallet {
pub struct Pezpallet<T, I = ()>(_);
#[pezpallet::config]
pub trait Config<I: 'static = ()>: pezframe_system::Config + pezpallet_treasury::Config<I> {
pub trait Config<I: 'static = ()>:
pezframe_system::Config + pezpallet_treasury::Config<I>
{
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self, I>>
@@ -435,7 +437,10 @@ pub mod pezpallet {
let tip = Tips::<T, I>::get(hash).ok_or(Error::<T, I>::UnknownTip)?;
let n = tip.closes.as_ref().ok_or(Error::<T, I>::StillOpen)?;
ensure!(pezframe_system::Pezpallet::<T>::block_number() >= *n, Error::<T, I>::Premature);
ensure!(
pezframe_system::Pezpallet::<T>::block_number() >= *n,
Error::<T, I>::Premature
);
// closed.
Reasons::<T, I>::remove(&tip.reason);
Tips::<T, I>::remove(hash);
@@ -529,7 +534,8 @@ impl<T: Config<I>, I: 'static> Pezpallet<T, I> {
Self::retain_active_tips(&mut tip.tips);
let threshold = T::Tippers::count().div_ceil(2);
if tip.tips.len() >= threshold && tip.closes.is_none() {
tip.closes = Some(pezframe_system::Pezpallet::<T>::block_number() + T::TipCountdown::get());
tip.closes =
Some(pezframe_system::Pezpallet::<T>::block_number() + T::TipCountdown::get());
true
} else {
false
@@ -96,7 +96,8 @@ impl<T: UnlockConfig<I>, I: 'static> UnreserveDeposits<T, I> {
/// * `BTreeMap<T::AccountId, T::Balance>`: Map of account IDs to their respective total
/// reserved balance by this pezpallet
/// * `pezframe_support::weights::Weight`: The weight of this operation.
fn get_deposits() -> (BTreeMap<T::AccountId, BalanceOf<T, I>>, pezframe_support::weights::Weight) {
fn get_deposits() -> (BTreeMap<T::AccountId, BalanceOf<T, I>>, pezframe_support::weights::Weight)
{
use pezsp_core::Get;
let mut tips_len = 0;
@@ -130,8 +131,8 @@ where
/// 5. Returns the pre-migration actual reserved balance for each account that will
/// be part of the migration.
///
/// Fails with a `TryRuntimeError` if somehow the amount reserved by this pezpallet is greater than
/// the actual total reserved amount for any accounts.
/// Fails with a `TryRuntimeError` if somehow the amount reserved by this pezpallet is greater
/// than the actual total reserved amount for any accounts.
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<alloc::vec::Vec<u8>, pezsp_runtime::TryRuntimeError> {
use codec::Encode;
@@ -147,8 +148,8 @@ where
.collect();
// The deposit amount must be less than or equal to the reserved amount.
// If it is higher, there is either a bug with the pezpallet or a bug in the calculation of the
// deposit amount.
// If it is higher, there is either a bug with the pezpallet or a bug in the calculation of
// the deposit amount.
ensure!(
account_deposits.iter().all(|(account, deposit)| *deposit <=
*account_reserved_before.get(account).unwrap_or(&Zero::zero())),
@@ -39,7 +39,11 @@ use crate as pezpallet_tips;
/// The migration will look into the storage version in order not to trigger a migration on an up
/// to date storage. Thus the on chain storage version must be less than 4 in order to trigger the
/// migration.
pub fn migrate<T: pezpallet_tips::Config, P: GetStorageVersion + PalletInfoAccess, N: AsRef<str>>(
pub fn migrate<
T: pezpallet_tips::Config,
P: GetStorageVersion + PalletInfoAccess,
N: AsRef<str>,
>(
old_pallet_name: N,
) -> Weight {
let old_pallet_name = old_pallet_name.as_ref();