mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
configuration: backport async backing parameters from the feature branch (#6961)
* Backport async backing params primitive * migration follow-up * link pr * parameters -> params * rustfmt::skip block ident
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
use crate::configuration::{self, ActiveConfig, Config, Pallet, PendingConfigs, MAX_POV_SIZE};
|
||||
use frame_support::{pallet_prelude::*, traits::StorageVersion, weights::Weight};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use primitives::vstaging::AsyncBackingParams;
|
||||
use sp_std::vec::Vec;
|
||||
|
||||
/// The current storage version.
|
||||
@@ -27,7 +28,7 @@ use sp_std::vec::Vec;
|
||||
/// v1-v2: <https://github.com/paritytech/polkadot/pull/4420>
|
||||
/// v2-v3: <https://github.com/paritytech/polkadot/pull/6091>
|
||||
/// v3-v4: <https://github.com/paritytech/polkadot/pull/6345>
|
||||
/// v4-v5: <https://github.com/paritytech/polkadot/pull/6937>
|
||||
/// v4-v5: <https://github.com/paritytech/polkadot/pull/6937> + <https://github.com/paritytech/polkadot/pull/6961>
|
||||
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5);
|
||||
|
||||
pub mod v5 {
|
||||
@@ -226,6 +227,9 @@ ump_max_individual_weight : pre.ump_max_individual_weight,
|
||||
pvf_checking_enabled : pre.pvf_checking_enabled,
|
||||
pvf_voting_ttl : pre.pvf_voting_ttl,
|
||||
minimum_validation_upgrade_delay : pre.minimum_validation_upgrade_delay,
|
||||
|
||||
// Default values are zeroes, thus it's ensured allowed ancestry never crosses the upgrade block.
|
||||
async_backing_params : AsyncBackingParams { max_candidate_depth: 0, allowed_ancestry_len: 0 },
|
||||
}
|
||||
};
|
||||
|
||||
@@ -383,6 +387,10 @@ mod tests {
|
||||
assert_eq!(v4.pvf_voting_ttl , v5.pvf_voting_ttl);
|
||||
assert_eq!(v4.minimum_validation_upgrade_delay , v5.minimum_validation_upgrade_delay);
|
||||
}; // ; makes this a statement. `rustfmt::skip` cannot be put on an expression.
|
||||
|
||||
// additional checks for async backing.
|
||||
assert_eq!(v5.async_backing_params.allowed_ancestry_len, 0);
|
||||
assert_eq!(v5.async_backing_params.max_candidate_depth, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user