Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix compilation of sp-authorship #4337

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix compilation of sp-authorship
  • Loading branch information
bkchr committed Dec 9, 2019
commit e795097ea7b20e1c1e2def547170b9bb1802957e
11 changes: 6 additions & 5 deletions primitives/authorship/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ description = "Authorship primitives"
edition = "2018"

[dependencies]
sp-inherents = { package = "sp-inherents", path = "../inherents", default-features = false }
sr-primitives = { package = "sp-runtime", path = "../sr-primitives", default-features = false }
sp-inherents = { path = "../inherents", default-features = false }
sp-runtime = { path = "../runtime", default-features = false }
rstd = { package = "sp-std", path = "../sr-std", default-features = false }
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }

[features]
default = [ "std" ]
std = [
"codec/std",
"rstd/std",
"sp-inherents/std",
"codec/std",
"rstd/std",
"sp-inherents/std",
"sp-runtime/std",
]
6 changes: 3 additions & 3 deletions primitives/authorship/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ use rstd::{result::Result, prelude::*};

use codec::{Encode, Decode};
use sp_inherents::{Error, InherentIdentifier, InherentData, IsFatalError};
use sr_primitives::RuntimeString;
use sp_runtime::RuntimeString;

/// The identifier for the `uncles` inherent.
pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"uncles00";

/// Errors that can occur while checking the authorship inherent.
#[derive(Encode, sr_primitives::RuntimeDebug)]
#[derive(Encode, sp_runtime::RuntimeDebug)]
#[cfg_attr(feature = "std", derive(Decode))]
pub enum InherentError {
Uncles(RuntimeString),
Expand Down Expand Up @@ -88,4 +88,4 @@ where F: Fn() -> Vec<H>
fn error_to_string(&self, _error: &[u8]) -> Option<String> {
Some(format!("no further information"))
}
}
}