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
+2 -2
View File
@@ -21,7 +21,7 @@
pub use timestamp;
use rstd::{result, prelude::*};
use srml_support::{decl_storage, decl_module, StorageValue, traits::FindAuthor};
use srml_support::{decl_storage, decl_module, StorageValue, traits::FindAuthor, traits::Get};
use timestamp::{OnTimestampSet, Trait};
use primitives::{generic::DigestItem, traits::{SaturatedConversion, Saturating, RandomnessBeacon}};
use primitives::ConsensusEngineId;
@@ -193,7 +193,7 @@ impl<T: Trait> Module<T> {
pub fn slot_duration() -> T::Moment {
// we double the minimum block-period so each author can always propose within
// the majority of their slot.
<timestamp::Module<T>>::minimum_period().saturating_mul(2.into())
<T as timestamp::Trait>::MinimumPeriod::get().saturating_mul(2.into())
}
fn change_authorities(new: Vec<AuthorityId>) {