assign db weights (#1011)

This commit is contained in:
Nikolay Volf
2020-04-25 16:47:26 +03:00
committed by GitHub
parent 0a10e37c99
commit 3252ba8383
3 changed files with 28 additions and 4 deletions
+9 -1
View File
@@ -55,6 +55,7 @@ use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, debug,
traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier},
weights::RuntimeDbWeight,
};
use im_online::sr25519::AuthorityId as ImOnlineId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
@@ -131,6 +132,13 @@ parameter_types! {
pub const Version: RuntimeVersion = VERSION;
}
parameter_types! {
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 60_000_000,
write: 200_000_000,
};
}
impl system::Trait for Runtime {
type Origin = Origin;
type Call = Call;
@@ -144,7 +152,7 @@ impl system::Trait for Runtime {
type Event = Event;
type BlockHashCount = BlockHashCount;
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type DbWeight = DbWeight;
type BlockExecutionWeight = BlockExecutionWeight;
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
type MaximumBlockLength = MaximumBlockLength;
+9 -1
View File
@@ -57,6 +57,7 @@ use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, debug,
traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier},
weights::RuntimeDbWeight,
};
use im_online::sr25519::AuthorityId as ImOnlineId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
@@ -137,6 +138,13 @@ parameter_types! {
pub const Version: RuntimeVersion = VERSION;
}
parameter_types! {
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 60_000_000,
write: 200_000_000,
};
}
impl system::Trait for Runtime {
type Origin = Origin;
type Call = Call;
@@ -150,7 +158,7 @@ impl system::Trait for Runtime {
type Event = Event;
type BlockHashCount = BlockHashCount;
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type DbWeight = DbWeight;
type BlockExecutionWeight = BlockExecutionWeight;
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
type MaximumBlockLength = MaximumBlockLength;
+10 -2
View File
@@ -55,6 +55,7 @@ use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, debug,
traits::{KeyOwnerProofSystem, Randomness},
weights::RuntimeDbWeight,
};
use im_online::sr25519::AuthorityId as ImOnlineId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
@@ -131,6 +132,13 @@ parameter_types! {
pub const Version: RuntimeVersion = VERSION;
}
parameter_types! {
pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 60_000_000,
write: 200_000_000,
};
}
impl system::Trait for Runtime {
type Origin = Origin;
type Call = Call;
@@ -144,8 +152,8 @@ impl system::Trait for Runtime {
type Event = Event;
type BlockHashCount = BlockHashCount;
type MaximumBlockWeight = MaximumBlockWeight;
type DbWeight = ();
type BlockExecutionWeight = BlockExecutionWeight;
type DbWeight = DbWeight;
type BlockExecutionWeight = BlockExecutionWeight;
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
type MaximumBlockLength = MaximumBlockLength;
type AvailableBlockRatio = AvailableBlockRatio;