mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 16:27:56 +00:00
Upgrade to substrate 2.0.0 (#173)
* Upgrade to substrate 2.0.0 * WIP implement Subcommand manually (see https://github.com/paritytech/substrate/pull/6894#issuecomment-676060197) * Add pallet-staking/std to the std feature * Sort out the subcommand impl * Sort out the module index (ty @ascjones) Sort out the RefCount type (ty @dvc94ch) Random tweaks to make test-node more similar to the vanilla node-template * obey the fmt * cleanup * more cleanup
This commit is contained in:
@@ -169,14 +169,16 @@ pub fn native_version() -> NativeVersion {
|
||||
}
|
||||
}
|
||||
|
||||
const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: BlockNumber = 2400;
|
||||
/// We allow for 2 seconds of compute with a 6 second average block time.
|
||||
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||
/// Assume 10% of weight for average on_initialize calls.
|
||||
pub 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;
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
}
|
||||
@@ -226,10 +228,6 @@ impl frame_system::Trait for Runtime {
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
/// Version of the runtime.
|
||||
type Version = Version;
|
||||
/// Converts a module to the index of the module in `construct_runtime!`.
|
||||
///
|
||||
/// This type is being generated by `construct_runtime!`.
|
||||
type ModuleToIndex = ModuleToIndex;
|
||||
/// What to do if a new account is created.
|
||||
type OnNewAccount = ();
|
||||
/// What to do if an account is fully reaped from the system.
|
||||
@@ -238,6 +236,8 @@ impl frame_system::Trait for Runtime {
|
||||
type AccountData = pallet_balances::AccountData<Balance>;
|
||||
/// Weight information for the extrinsics of this pallet.
|
||||
type SystemWeightInfo = ();
|
||||
/// Provides information about the pallet setup in the runtime.
|
||||
type PalletInfo = PalletInfo;
|
||||
}
|
||||
|
||||
impl pallet_aura::Trait for Runtime {
|
||||
@@ -259,6 +259,7 @@ impl pallet_grandpa::Trait for Runtime {
|
||||
)>>::IdentificationTuple;
|
||||
|
||||
type HandleEquivocation = ();
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -286,6 +287,7 @@ impl pallet_balances::Trait for Runtime {
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
type WeightInfo = ();
|
||||
type MaxLocks = ();
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user