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
+1 -1
View File
@@ -9,7 +9,7 @@ edition = "2018"
client-api = { package = "substrate-client-api", path = "../../api" }
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
sr-primitives = { path = "../../../primitives/sr-primitives" }
paint-authorship = { path = "../../../paint/authorship" }
sp-authorship = { path = "../../../primitives/authorship" }
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
log = "0.4.8"
+3 -2
View File
@@ -25,6 +25,7 @@ use log::warn;
use client_api::ProvideUncles;
use sr_primitives::traits::{Block as BlockT, Header};
use std::sync::Arc;
use sp_authorship;
/// Maximum uncles generations we may provide to the runtime.
const MAX_UNCLE_GENERATIONS: u32 = 8;
@@ -39,9 +40,9 @@ pub fn register_uncles_inherent_data_provider<B, C, SC>(
C: ProvideUncles<B> + Send + Sync + 'static,
SC: SelectChain<B> + 'static,
{
if !inherent_data_providers.has_provider(&paint_authorship::INHERENT_IDENTIFIER) {
if !inherent_data_providers.has_provider(&sp_authorship::INHERENT_IDENTIFIER) {
inherent_data_providers
.register_provider(paint_authorship::InherentDataProvider::new(move || {
.register_provider(sp_authorship::InherentDataProvider::new(move || {
{
let chain_head = match select_chain.best_chain() {
Ok(x) => x,