diff --git a/client/service/src/builder_ext.rs b/client/service/src/builder_ext.rs index fc92299..92a34f5 100644 --- a/client/service/src/builder_ext.rs +++ b/client/service/src/builder_ext.rs @@ -74,23 +74,25 @@ where // for import_queue TFullClient: sp_consensus::BlockImport, - as sp_api::ProvideRuntimeApi>::Api: sp_api::Core - + ApiExt< - TBl, - StateBackend = as sc_client_api::backend::Backend>::State, - >, + as sp_api::ProvideRuntimeApi>::Api: + sp_api::Core + + ApiExt< + TBl, + StateBackend = as sc_client_api::backend::Backend>::State, + >, // spawn_tasks - TFullClient: sp_blockchain::HeaderMetadata - + sp_consensus::block_validation::Chain - + sp_runtime::traits::BlockIdTo - + sc_client_api::ProofProvider - + sp_blockchain::HeaderBackend - + sc_client_api::BlockchainEvents - + sc_client_api::UsageProvider - + sc_client_api::StorageProvider> - + sp_api::CallApiAt - + Send - + 'static, + TFullClient: + sp_blockchain::HeaderMetadata + + sp_consensus::block_validation::Chain + + sp_runtime::traits::BlockIdTo + + sc_client_api::ProofProvider + + sp_blockchain::HeaderBackend + + sc_client_api::BlockchainEvents + + sc_client_api::UsageProvider + + sc_client_api::StorageProvider> + + sp_api::CallApiAt + + Send + + 'static, as sp_api::ProvideRuntimeApi>::Api: sp_api::Metadata + sp_session::SessionKeys diff --git a/client/service/src/client/mod.rs b/client/service/src/client/mod.rs index adf81e2..a616f37 100644 --- a/client/service/src/client/mod.rs +++ b/client/service/src/client/mod.rs @@ -46,7 +46,7 @@ use sp_runtime::{ generic::{BlockId, SignedBlock}, traits::{ Block as BlockT, DigestFor, HashFor, Header as HeaderT, NumberFor, One, - SaturatedConversion, Zero, + UniqueSaturatedInto, Zero, }, BuildStorage, Justification, }; @@ -928,7 +928,7 @@ where let mut ancestor = load_header(ancestor_hash)?; let mut uncles = Vec::new(); - for _generation in 0..max_generation.saturated_into() { + for _generation in 0u32..UniqueSaturatedInto::::unique_saturated_into(max_generation) { let children = self.backend.blockchain().children(ancestor_hash)?; uncles.extend(children.into_iter().filter(|h| h != ¤t_hash)); current_hash = ancestor_hash; @@ -1038,8 +1038,9 @@ where E: CallExecutor + Send + Sync + 'static, Block: BlockT, Self: ChainHeaderBackend + ProvideRuntimeApi, - >::Api: ApiExt> - + BlockBuilderApi, + >::Api: + ApiExt> + + BlockBuilderApi, { fn new_block_at>( &self,