mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 22:31:03 +00:00
Consistency with the Block trait name (#3129)
* Consistency with the Block trait name * Line widths
This commit is contained in:
committed by
André Silva
parent
768eb1af4d
commit
a22bb71029
@@ -38,12 +38,12 @@ use futures::{
|
||||
use inherents::{InherentData, InherentDataProviders};
|
||||
use log::{debug, error, info, warn};
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use runtime_primitives::traits::{ApiRef, Block, ProvideRuntimeApi};
|
||||
use runtime_primitives::traits::{ApiRef, Block as BlockT, ProvideRuntimeApi};
|
||||
use std::fmt::Debug;
|
||||
use std::ops::Deref;
|
||||
|
||||
/// A worker that should be invoked at every new slot.
|
||||
pub trait SlotWorker<B: Block> {
|
||||
pub trait SlotWorker<B: BlockT> {
|
||||
/// The type of the future that will be returned when a new slot is
|
||||
/// triggered.
|
||||
type OnSlot: IntoFuture<Item = (), Error = consensus_common::Error>;
|
||||
@@ -78,7 +78,7 @@ pub fn start_slot_worker<B, C, W, T, SO, SC>(
|
||||
timestamp_extractor: SC,
|
||||
) -> impl Future<Item = (), Error = ()>
|
||||
where
|
||||
B: Block,
|
||||
B: BlockT,
|
||||
C: SelectChain<B> + Clone,
|
||||
W: SlotWorker<B>,
|
||||
SO: SyncOracle + Send + Clone,
|
||||
@@ -193,7 +193,7 @@ impl<T: Clone> SlotDuration<T> {
|
||||
///
|
||||
/// `slot_key` is marked as `'static`, as it should really be a
|
||||
/// compile-time constant.
|
||||
pub fn get_or_compute<B: Block, C, CB>(client: &C, cb: CB) -> ::client::error::Result<Self> where
|
||||
pub fn get_or_compute<B: BlockT, C, CB>(client: &C, cb: CB) -> ::client::error::Result<Self> where
|
||||
C: client::backend::AuxStore,
|
||||
C: ProvideRuntimeApi,
|
||||
CB: FnOnce(ApiRef<C::Api>, &BlockId<B>) -> ::client::error::Result<T>,
|
||||
|
||||
Reference in New Issue
Block a user