Convert unnecessary storage item to static. (#3093)

* Convert unnecessary storage item to static.

* Polish

* 6 second blocks.

* Compile fixes

* Bump runtime

* Fix

* Another fix

* Import `srml_support::traits::Get`

* Export MinimumPeriod from `decl_module!`

* Remove `config` from Timestamp

* Clean up warnings
This commit is contained in:
Gavin Wood
2019-07-11 23:03:33 +02:00
committed by GitHub
parent b3dc472a9b
commit e4d4548121
15 changed files with 65 additions and 90 deletions
+5 -2
View File
@@ -33,7 +33,6 @@ pub use runtime_primitives::BuildStorage;
pub use timestamp::Call as TimestampCall;
pub use balances::Call as BalancesCall;
pub use runtime_primitives::{Permill, Perbill};
pub use timestamp::BlockPeriod;
pub use support::{StorageValue, construct_runtime, parameter_types};
/// Alias to the signature scheme used for Aura authority signatures.
@@ -155,10 +154,14 @@ impl indices::Trait for Runtime {
type Event = Event;
}
parameter_types! {
pub const MinimumPeriod: u64 = 5;
}
impl timestamp::Trait for Runtime {
/// A timestamp: seconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
type MinimumPeriod = MinimumPeriod;
}
parameter_types! {
@@ -207,7 +210,7 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{Module, Call, Storage, Config, Event},
Timestamp: timestamp::{Module, Call, Storage, Config<T>, Inherent},
Timestamp: timestamp::{Module, Call, Storage, Inherent},
Aura: aura::{Module, Config<T>, Inherent(Timestamp)},
Indices: indices::{default, Config<T>},
Balances: balances,