mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Assign DB weights for node runtime (#5703)
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
use sp_std::prelude::*;
|
||||
use frame_support::{
|
||||
construct_runtime, parameter_types, debug,
|
||||
weights::Weight,
|
||||
weights::{Weight, RuntimeDbWeight},
|
||||
traits::{Currency, Randomness, OnUnbalanced, Imbalance},
|
||||
};
|
||||
use sp_core::u32_trait::{_1, _2, _3, _4};
|
||||
@@ -123,6 +123,10 @@ parameter_types! {
|
||||
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
||||
pub const Version: RuntimeVersion = VERSION;
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 60_000_000, // ~0.06 ms = ~60 µs
|
||||
write: 200_000_000, // ~0.2 ms = 200 µs
|
||||
};
|
||||
}
|
||||
|
||||
impl frame_system::Trait for Runtime {
|
||||
@@ -138,7 +142,7 @@ impl frame_system::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type MaximumBlockWeight = MaximumBlockWeight;
|
||||
type DbWeight = ();
|
||||
type DbWeight = DbWeight;
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type Version = Version;
|
||||
|
||||
Reference in New Issue
Block a user