mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41: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:
@@ -13,6 +13,7 @@ rustc-hex = { version = "2.0.1", default-features = false }
|
||||
serde = { version = "1.0.102", default-features = false }
|
||||
serde_derive = { version = "1.0.102", optional = true }
|
||||
smallvec = "1.4.0"
|
||||
static_assertions = "1.1.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#![recursion_limit="256"]
|
||||
|
||||
use sp_std::prelude::*;
|
||||
use static_assertions::const_assert;
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
|
||||
@@ -34,7 +35,7 @@ use runtime_common::{attestations, parachains, registrar,
|
||||
};
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
ApplyExtrinsicResult, KeyTypeId, Perbill, Perquintill, curve::PiecewiseLinear,
|
||||
ApplyExtrinsicResult, KeyTypeId, Perbill, Perquintill, curve::PiecewiseLinear, PerThing,
|
||||
transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority},
|
||||
traits::{
|
||||
BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, IdentityLookup,
|
||||
@@ -179,10 +180,16 @@ impl balances::Trait for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
|
||||
// for a sane configuration, this should always be less than `AvailableBlockRatio`.
|
||||
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
|
||||
}
|
||||
|
||||
// for a sane configuration, this should always be less than `AvailableBlockRatio`.
|
||||
const_assert!(
|
||||
TargetBlockFullness::get().deconstruct() <
|
||||
(AvailableBlockRatio::get().deconstruct() as <Perquintill as PerThing>::Inner)
|
||||
* (<Perquintill as PerThing>::ACCURACY / <Perbill as PerThing>::ACCURACY as <Perquintill as PerThing>::Inner)
|
||||
);
|
||||
|
||||
impl transaction_payment::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = ToAuthor<Runtime>;
|
||||
@@ -309,7 +316,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
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 Runtime {
|
||||
@@ -361,8 +368,8 @@ impl grandpa::Trait for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const WindowSize: BlockNumber = finality_tracker::DEFAULT_WINDOW_SIZE.into();
|
||||
pub const ReportLatency: BlockNumber = finality_tracker::DEFAULT_REPORT_LATENCY.into();
|
||||
pub WindowSize: BlockNumber = finality_tracker::DEFAULT_WINDOW_SIZE.into();
|
||||
pub ReportLatency: BlockNumber = finality_tracker::DEFAULT_REPORT_LATENCY.into();
|
||||
}
|
||||
|
||||
impl finality_tracker::Trait for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user