mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 11:41:02 +00:00
Companion for substrate/pull/7215 (#1768)
* Companion for substrate/pull/7215 * More fixes * Fix build * fix * Fix again with normal * Fix build * Latest changes * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -51,7 +51,7 @@ pub type NegativeImbalance<T> = <pallet_balances::Module<T> as Currency<<T as fr
|
||||
|
||||
/// We assume that an on-initialize consumes 10% of the weight on average, hence a single extrinsic
|
||||
/// will not be allowed to consume more than `AvailableBlockRatio - 10%`.
|
||||
const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
|
||||
pub const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
|
||||
|
||||
// Common constants used in all runtimes.
|
||||
parameter_types! {
|
||||
@@ -61,8 +61,9 @@ parameter_types! {
|
||||
/// Portion of the block available to normal class of dispatches.
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||
/// Maximum weight that a _single_ extrinsic can take.
|
||||
pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
|
||||
.saturating_sub(AVERAGE_ON_INITIALIZE_WEIGHT) * MaximumBlockWeight::get();
|
||||
pub MaximumExtrinsicWeight: Weight =
|
||||
AvailableBlockRatio::get().saturating_sub(AVERAGE_ON_INITIALIZE_WEIGHT)
|
||||
* MaximumBlockWeight::get();
|
||||
/// Maximum length of block. 5MB.
|
||||
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
||||
/// The portion of the `AvailableBlockRatio` that we adjust the fees with. Blocks filled less
|
||||
|
||||
@@ -411,6 +411,7 @@ mod tests {
|
||||
type UnsignedPriority = StakingUnsignedPriority;
|
||||
type MaxIterations = ();
|
||||
type MinSolutionScoreBump = ();
|
||||
type OffchainSolutionWeightLimit = MaximumBlockWeight;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user