Move inherents to primitives (#4126)

* Split Aura and Timestamp inherents out of paint

* fixup node depedencies

* move babe inherents to primitives

* move authorship inherents into primitives

* Move finalty tracker inherents into primitives

* fix aura primitives import
This commit is contained in:
Benjamin Kampmann
2019-11-20 12:18:36 +01:00
committed by GitHub
parent 5979a8c3e5
commit 303843f483
38 changed files with 654 additions and 404 deletions
+4 -4
View File
@@ -35,8 +35,8 @@ use sr_primitives::{
use transaction_factory::RuntimeAdapter;
use transaction_factory::modes::Mode;
use inherents::InherentData;
use timestamp;
use finality_tracker;
use sp_timestamp;
use sp_finality_tracker;
type AccountPublic = <Signature as Verify>::Signer;
@@ -160,9 +160,9 @@ impl RuntimeAdapter for FactoryState<Number> {
let timestamp = (self.block_no as u64 + 1) * MinimumPeriod::get();
let mut inherent = InherentData::new();
inherent.put_data(timestamp::INHERENT_IDENTIFIER, &timestamp)
inherent.put_data(sp_timestamp::INHERENT_IDENTIFIER, &timestamp)
.expect("Failed putting timestamp inherent");
inherent.put_data(finality_tracker::INHERENT_IDENTIFIER, &self.block_no)
inherent.put_data(sp_finality_tracker::INHERENT_IDENTIFIER, &self.block_no)
.expect("Failed putting finalized number inherent");
inherent
}