mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Set uncles inherent (#3317)
* Include uncles * Filter missing uncles * Moved inherent registration to a new crate * Ignore invalid inherent encoding
This commit is contained in:
@@ -67,6 +67,7 @@ use client::{
|
||||
block_builder::api::BlockBuilder as BlockBuilderApi,
|
||||
blockchain::{self, HeaderBackend, ProvideCache}, BlockchainEvents, CallExecutor, Client,
|
||||
runtime_api::ApiExt, error::Result as ClientResult, backend::{AuxStore, Backend},
|
||||
ProvideUncles,
|
||||
utils::is_descendent_of,
|
||||
};
|
||||
use fork_tree::ForkTree;
|
||||
@@ -182,9 +183,9 @@ pub fn start_babe<B, C, SC, E, I, SO, Error, H>(BabeParams {
|
||||
consensus_common::Error,
|
||||
> where
|
||||
B: BlockT<Header=H>,
|
||||
C: ProvideRuntimeApi + ProvideCache<B>,
|
||||
C: ProvideRuntimeApi + ProvideCache<B> + ProvideUncles<B> + Send + Sync + 'static,
|
||||
C::Api: BabeApi<B>,
|
||||
SC: SelectChain<B>,
|
||||
SC: SelectChain<B> + 'static,
|
||||
E::Proposer: Proposer<B, Error=Error>,
|
||||
<E::Proposer as Proposer<B>>::Create: Unpin + Send + 'static,
|
||||
H: Header<Hash=B::Hash>,
|
||||
@@ -203,6 +204,11 @@ pub fn start_babe<B, C, SC, E, I, SO, Error, H>(BabeParams {
|
||||
keystore,
|
||||
};
|
||||
register_babe_inherent_data_provider(&inherent_data_providers, config.0.slot_duration())?;
|
||||
uncles::register_uncles_inherent_data_provider(
|
||||
client.clone(),
|
||||
select_chain.clone(),
|
||||
&inherent_data_providers,
|
||||
)?;
|
||||
Ok(slots::start_slot_worker(
|
||||
config.0,
|
||||
select_chain,
|
||||
|
||||
Reference in New Issue
Block a user