From ccdb10c5b3af04a1527920bf77c444083d29b8c9 Mon Sep 17 00:00:00 2001 From: Aten Date: Mon, 7 Dec 2020 17:33:25 +0800 Subject: [PATCH] Update/token name (#39) * remove (new) in token name * Make europa compile with latest nightly --- client/service/src/builder_ext.rs | 34 ++++++++++++++++--------------- client/service/src/client/mod.rs | 9 ++++---- 2 files changed, 23 insertions(+), 20 deletions(-) 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,