pub fn new_light<B, S, F, GS, RA, E>(
	backend: Arc<Backend<S, F, Blake2Hasher>>,
	fetcher: Arc<F>,
	genesis_storage: GS,
	code_executor: E,
) -> ClientResult<Client<Backend<S, F, Blake2Hasher>, RemoteOrLocalCallExecutor<
	B,
	Backend<S, F, Blake2Hasher>,
	RemoteCallExecutor<Blockchain<S, F>, F>,
	LocalCallExecutor<Backend<S, F, Blake2Hasher>, E>
>, B, RA>>
	where
		B: BlockT<Hash=H256>,
		S: BlockchainStorage<B>,
		F: Fetcher<B>,
		GS: BuildStorage,
		E: CodeExecutor<Blake2Hasher> + RuntimeInfo,
{
	let remote_executor = RemoteCallExecutor::new(backend.blockchain().clone(), fetcher);
	let local_executor = LocalCallExecutor::new(backend.clone(), code_executor);
	let executor = RemoteOrLocalCallExecutor::new(backend.clone(), remote_executor, local_executor);
	Client::new(backend, executor, genesis_storage, Default::default())
}
/// Create an instance of light client.
Create an instance of light client.
Create an instance of light client .
pub fn new_light<B, S, F, GS, RA, E>(
	backend: Arc<Backend<S, F, Blake2Hasher>>,
	fetcher: Arc<F>,
	genesis_storage: GS,
	code_executor: E,
) -> ClientResult<Client<Backend<S, F, Blake2Hasher>, RemoteOrLocalCallExecutor<
	B,
	Backend<S, F, Blake2Hasher>,
	RemoteCallExecutor<Blockchain<S, F>, F>,
	LocalCallExecutor<Backend<S, F, Blake2Hasher>, E>
>, B, RA>>
	where
		B: BlockT<Hash=H256>,
		S: BlockchainStorage<B>,
		F: Fetcher<B>,
		GS: BuildStorage,
		E: CodeExecutor<Blake2Hasher> + RuntimeInfo,
{
	let remote_executor = RemoteCallExecutor::new(backend.blockchain().clone(), fetcher);
	let local_executor = LocalCallExecutor::new(backend.clone(), code_executor);
	let executor = RemoteOrLocalCallExecutor::new(backend.clone(), remote_executor, local_executor);
	Client::new(backend, executor, genesis_storage, Default::default())
}
pub fn new_light < B , S , F , GS , RA , E > ( backend : Arc < Backend < S , F , Blake2Hasher > > , fetcher : Arc < F > , genesis_storage : GS , code_executor : E , ) -> ClientResult < Client < Backend < S , F , Blake2Hasher > , RemoteOrLocalCallExecutor < B , Backend < S , F , Blake2Hasher > , RemoteCallExecutor < Blockchain < S , F > , F > , LocalCallExecutor < Backend < S , F , Blake2Hasher > , E > > , B , RA > > where B : BlockT < Hash = H256 > , S : BlockchainStorage < B > , F : Fetcher < B > , GS : BuildStorage , E : CodeExecutor < Blake2Hasher > + RuntimeInfo , { let remote_executor = RemoteCallExecutor :: new ( backend . blockchain ( ) . clone ( ) , fetcher ) ; let local_executor = LocalCallExecutor :: new ( backend . clone ( ) , code_executor ) ; let executor = RemoteOrLocalCallExecutor :: new ( backend . clone ( ) , remote_executor , local_executor ) ; Client :: new ( backend , executor , genesis_storage , Default :: default ( ) ) }
Create an instance of light client.
Create an instance of light client .
backend
Arc<Backend<S, F, Blake2Hasher>>
fetcher
Arc<F>
genesis_storage
GS
code_executor
E
backend
Arc<Backend<S, F, Blake2Hasher>>
fetcher
Arc<F>
genesis_storage
GS
code_executor
E