mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 10:31:03 +00:00
companion for substrate/pull/6132 (#1159)
* companion for https://github.com/paritytech/substrate/pull/6132 * Fix more tests * upsub * Bump * Update runtime/common/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * remove cleanup * Update runtime/westend/src/lib.rs * Apply suggestions from code review * Fix build Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -684,7 +684,7 @@ mod tests {
|
||||
}
|
||||
|
||||
parameter_types!{
|
||||
pub const Prefix: &'static [u8] = b"Pay RUSTs to the TEST account:";
|
||||
pub Prefix: &'static [u8] = b"Pay RUSTs to the TEST account:";
|
||||
}
|
||||
|
||||
impl Trait for Test {
|
||||
|
||||
@@ -38,7 +38,7 @@ use frame_support::{
|
||||
parameter_types, traits::{Currency, Filter},
|
||||
weights::{Weight, constants::WEIGHT_PER_SECOND},
|
||||
};
|
||||
|
||||
use static_assertions::const_assert;
|
||||
pub use frame_support::weights::constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
@@ -56,15 +56,17 @@ use sp_runtime::traits::Dispatchable;
|
||||
|
||||
pub type NegativeImbalance<T> = <balances::Module<T> as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
|
||||
|
||||
const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: BlockNumber = 2400;
|
||||
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||
pub const MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
|
||||
.saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
|
||||
pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
|
||||
.saturating_sub(AVERAGE_ON_INITIALIZE_WEIGHT) * MaximumBlockWeight::get();
|
||||
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
||||
}
|
||||
|
||||
const_assert!(AvailableBlockRatio::get().deconstruct() >= AVERAGE_ON_INITIALIZE_WEIGHT.deconstruct());
|
||||
|
||||
/// Apply a given filter to transactions.
|
||||
pub struct TransactionCallFilter<T: Filter<Call>, Call>(PhantomData<(T, Call)>);
|
||||
|
||||
@@ -1811,7 +1811,7 @@ mod tests {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
|
||||
pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
|
||||
}
|
||||
|
||||
impl offences::Trait for Test {
|
||||
|
||||
Reference in New Issue
Block a user