mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
* Companion to #6067 * Fix tests? * Use AvailableBlockLimit instead of hardcoding the value. * Bump substrate.
This commit is contained in:
Generated
+139
-139
File diff suppressed because it is too large
Load Diff
@@ -646,6 +646,7 @@ mod tests {
|
|||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type BlockExecutionWeight = ();
|
type BlockExecutionWeight = ();
|
||||||
type ExtrinsicBaseWeight = ();
|
type ExtrinsicBaseWeight = ();
|
||||||
|
type MaximumExtrinsicWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
|
|||||||
@@ -608,6 +608,7 @@ mod tests {
|
|||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type BlockExecutionWeight = ();
|
type BlockExecutionWeight = ();
|
||||||
type ExtrinsicBaseWeight = ();
|
type ExtrinsicBaseWeight = ();
|
||||||
|
type MaximumExtrinsicWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ pub mod crowdfund;
|
|||||||
pub mod impls;
|
pub mod impls;
|
||||||
|
|
||||||
use primitives::BlockNumber;
|
use primitives::BlockNumber;
|
||||||
use sp_runtime::Perbill;
|
use sp_runtime::{traits::Saturating, Perbill};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
parameter_types, traits::Currency,
|
parameter_types, traits::Currency,
|
||||||
weights::{Weight, constants::WEIGHT_PER_SECOND},
|
weights::{Weight, constants::WEIGHT_PER_SECOND},
|
||||||
@@ -54,5 +54,7 @@ parameter_types! {
|
|||||||
pub const BlockHashCount: BlockNumber = 2400;
|
pub const BlockHashCount: BlockNumber = 2400;
|
||||||
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
|
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
|
||||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||||
|
pub const MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
|
||||||
|
.saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
|
||||||
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1624,6 +1624,7 @@ mod tests {
|
|||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type BlockExecutionWeight = ();
|
type BlockExecutionWeight = ();
|
||||||
type ExtrinsicBaseWeight = ();
|
type ExtrinsicBaseWeight = ();
|
||||||
|
type MaximumExtrinsicWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
|
|||||||
@@ -738,6 +738,7 @@ mod tests {
|
|||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type BlockExecutionWeight = ();
|
type BlockExecutionWeight = ();
|
||||||
type ExtrinsicBaseWeight = ();
|
type ExtrinsicBaseWeight = ();
|
||||||
|
type MaximumExtrinsicWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
|
|||||||
@@ -924,6 +924,7 @@ mod tests {
|
|||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type BlockExecutionWeight = ();
|
type BlockExecutionWeight = ();
|
||||||
type ExtrinsicBaseWeight = ();
|
type ExtrinsicBaseWeight = ();
|
||||||
|
type MaximumExtrinsicWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ use runtime_common::{attestations, claims, parachains, registrar, slots,
|
|||||||
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
||||||
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
||||||
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
||||||
|
MaximumExtrinsicWeight
|
||||||
};
|
};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys, ModuleId,
|
create_runtime_str, generic, impl_opaque_keys, ModuleId,
|
||||||
@@ -148,6 +149,7 @@ impl system::Trait for Runtime {
|
|||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
type BlockExecutionWeight = BlockExecutionWeight;
|
type BlockExecutionWeight = BlockExecutionWeight;
|
||||||
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||||
|
type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = Version;
|
type Version = Version;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ use runtime_common::{attestations, claims, parachains, registrar, slots,
|
|||||||
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
||||||
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
||||||
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
||||||
|
MaximumExtrinsicWeight,
|
||||||
};
|
};
|
||||||
|
|
||||||
use sp_std::prelude::*;
|
use sp_std::prelude::*;
|
||||||
@@ -154,6 +155,7 @@ impl system::Trait for Runtime {
|
|||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
type BlockExecutionWeight = BlockExecutionWeight;
|
type BlockExecutionWeight = BlockExecutionWeight;
|
||||||
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||||
|
type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = Version;
|
type Version = Version;
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ impl system::Trait for Runtime {
|
|||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
type BlockExecutionWeight = BlockExecutionWeight;
|
type BlockExecutionWeight = BlockExecutionWeight;
|
||||||
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||||
|
type MaximumExtrinsicWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = Version;
|
type Version = Version;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ use primitives::{
|
|||||||
use runtime_common::{attestations, parachains, registrar,
|
use runtime_common::{attestations, parachains, registrar,
|
||||||
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
||||||
BlockHashCount, MaximumBlockWeight, AvailableBlockRatio, MaximumBlockLength,
|
BlockHashCount, MaximumBlockWeight, AvailableBlockRatio, MaximumBlockLength,
|
||||||
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, MaximumExtrinsicWeight
|
||||||
};
|
};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
@@ -147,6 +147,7 @@ impl system::Trait for Runtime {
|
|||||||
type DbWeight = RocksDbWeight;
|
type DbWeight = RocksDbWeight;
|
||||||
type BlockExecutionWeight = BlockExecutionWeight;
|
type BlockExecutionWeight = BlockExecutionWeight;
|
||||||
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||||
|
type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
type Version = Version;
|
type Version = Version;
|
||||||
|
|||||||
Reference in New Issue
Block a user