Consistency with the Block trait name (#3129)

* Consistency with the Block trait name

* Line widths
This commit is contained in:
Pierre Krieger
2019-07-16 16:32:46 +02:00
committed by André Silva
parent 768eb1af4d
commit a22bb71029
7 changed files with 80 additions and 70 deletions
+11 -11
View File
@@ -47,7 +47,7 @@ use client::{
};
use runtime_primitives::{generic::{self, BlockId, OpaqueDigestItemId}, Justification};
use runtime_primitives::traits::{Block, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member};
use runtime_primitives::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member};
use primitives::Pair;
use inherents::{InherentDataProviders, InherentData};
@@ -84,7 +84,7 @@ impl SlotDuration {
pub fn get_or_compute<A, B, C>(client: &C) -> CResult<Self>
where
A: Codec,
B: Block,
B: BlockT,
C: AuxStore + ProvideRuntimeApi,
C::Api: AuraApi<B, A>,
{
@@ -140,7 +140,7 @@ pub fn start_aura<B, C, SC, E, I, P, SO, Error, H>(
inherent_data_providers: InherentDataProviders,
force_authoring: bool,
) -> Result<impl Future<Item=(), Error=()>, consensus_common::Error> where
B: Block<Header=H>,
B: BlockT<Header=H>,
C: ProvideRuntimeApi + ProvideCache<B> + AuxStore + Send + Sync,
C::Api: AuraApi<B, AuthorityId<P>>,
SC: SelectChain<B>,
@@ -187,7 +187,7 @@ struct AuraWorker<C, E, I, P, SO> {
}
impl<H, B, C, E, I, P, Error, SO> SlotWorker<B> for AuraWorker<C, E, I, P, SO> where
B: Block<Header=H>,
B: BlockT<Header=H>,
C: ProvideRuntimeApi + ProvideCache<B> + Sync,
C::Api: AuraApi<B, AuthorityId<P>>,
E: Environment<B, Error=Error>,
@@ -358,7 +358,7 @@ macro_rules! aura_err {
};
}
fn find_pre_digest<B: Block, P: Pair>(header: &B::Header) -> Result<u64, String>
fn find_pre_digest<B: BlockT, P: Pair>(header: &B::Header) -> Result<u64, String>
where DigestItemFor<B>: CompatibleDigestItem<P>,
P::Signature: Decode,
P::Public: Encode + Decode + PartialEq + Clone,
@@ -382,7 +382,7 @@ fn find_pre_digest<B: Block, P: Pair>(header: &B::Header) -> Result<u64, String>
/// This digest item will always return `Some` when used with `as_aura_seal`.
//
// FIXME #1018 needs misbehavior types
fn check_header<C, B: Block, P: Pair>(
fn check_header<C, B: BlockT, P: Pair>(
client: &C,
slot_now: u64,
mut header: B::Header,
@@ -451,7 +451,7 @@ pub struct AuraVerifier<C, P> {
impl<C, P> AuraVerifier<C, P>
where P: Send + Sync + 'static
{
fn check_inherents<B: Block>(
fn check_inherents<B: BlockT>(
&self,
block: B,
block_id: BlockId<B>,
@@ -501,7 +501,7 @@ impl<C, P> AuraVerifier<C, P>
}
#[forbid(deprecated)]
impl<B: Block, C, P> Verifier<B> for AuraVerifier<C, P> where
impl<B: BlockT, C, P> Verifier<B> for AuraVerifier<C, P> where
C: ProvideRuntimeApi + Send + Sync + client::backend::AuxStore + ProvideCache<B>,
C::Api: BlockBuilderApi<B> + AuraApi<B, AuthorityId<P>>,
DigestItemFor<B>: CompatibleDigestItem<P>,
@@ -604,7 +604,7 @@ impl<B: Block, C, P> Verifier<B> for AuraVerifier<C, P> where
fn initialize_authorities_cache<A, B, C>(client: &C) -> Result<(), ConsensusError> where
A: Codec,
B: Block,
B: BlockT,
C: ProvideRuntimeApi + ProvideCache<B>,
C::Api: AuraApi<B, A>,
{
@@ -638,7 +638,7 @@ fn initialize_authorities_cache<A, B, C>(client: &C) -> Result<(), ConsensusErro
#[allow(deprecated)]
fn authorities<A, B, C>(client: &C, at: &BlockId<B>) -> Result<Vec<A>, ConsensusError> where
A: Codec,
B: Block,
B: BlockT,
C: ProvideRuntimeApi + ProvideCache<B>,
C::Api: AuraApi<B, A>,
{
@@ -679,7 +679,7 @@ pub fn import_queue<B, C, P>(
client: Arc<C>,
inherent_data_providers: InherentDataProviders,
) -> Result<AuraImportQueue<B>, consensus_common::Error> where
B: Block,
B: BlockT,
C: 'static + ProvideRuntimeApi + ProvideCache<B> + Send + Sync + AuxStore,
C::Api: BlockBuilderApi<B> + AuraApi<B, AuthorityId<P>>,
DigestItemFor<B>: CompatibleDigestItem<P>,