pub fn new_client<E, Block, RA>(
	settings: DatabaseSettings,
	executor: E,
	genesis_storage: &dyn BuildStorage,
	fork_blocks: ForkBlocks<Block>,
	bad_blocks: BadBlocks<Block>,
	execution_extensions: ExecutionExtensions<Block>,
	spawn_handle: Box<dyn SpawnNamed>,
	prometheus_registry: Option<Registry>,
	config: ClientConfig,
) -> Result<(
	crate::client::Client<
		Backend<Block>,
		crate::client::LocalCallExecutor<Backend<Block>, E>,
		Block,
		RA,
	>,
	Arc<Backend<Block>>,
),
	sp_blockchain::Error,
>
	where
		Block: BlockT,
		E: CodeExecutor + RuntimeInfo,
{
	const CANONICALIZATION_DELAY: u64 = 4096;

	let backend = Arc::new(Backend::new(settings, CANONICALIZATION_DELAY)?);
	let executor = crate::client::LocalCallExecutor::new(backend.clone(), executor, spawn_handle, config.clone())?;
	Ok((
		crate::client::Client::new(
			backend.clone(),
			executor,
			genesis_storage,
			fork_blocks,
			bad_blocks,
			execution_extensions,
			prometheus_registry,
			config,
		)?,
		backend,
	))
}
/// Create an instance of db-backed client.
Create an instance of db-backed client.
Create an instance of db - backed client .
pub fn new_client<E, Block, RA>(
	settings: DatabaseSettings,
	executor: E,
	genesis_storage: &dyn BuildStorage,
	fork_blocks: ForkBlocks<Block>,
	bad_blocks: BadBlocks<Block>,
	execution_extensions: ExecutionExtensions<Block>,
	spawn_handle: Box<dyn SpawnNamed>,
	prometheus_registry: Option<Registry>,
	config: ClientConfig,
) -> Result<(
	crate::client::Client<
		Backend<Block>,
		crate::client::LocalCallExecutor<Backend<Block>, E>,
		Block,
		RA,
	>,
	Arc<Backend<Block>>,
),
	sp_blockchain::Error,
>
	where
		Block: BlockT,
		E: CodeExecutor + RuntimeInfo,
{
	const CANONICALIZATION_DELAY: u64 = 4096;
	let backend = Arc::new(Backend::new(settings, CANONICALIZATION_DELAY)?);
	let executor = crate::client::LocalCallExecutor::new(backend.clone(), executor, spawn_handle, config.clone())?;
	Ok((
		crate::client::Client::new(
			backend.clone(),
			executor,
			genesis_storage,
			fork_blocks,
			bad_blocks,
			execution_extensions,
			prometheus_registry,
			config,
		)?,
		backend,
	))
}
pub fn new_client < E , Block , RA > ( settings : DatabaseSettings , executor : E , genesis_storage : & dyn BuildStorage , fork_blocks : ForkBlocks < Block > , bad_blocks : BadBlocks < Block > , execution_extensions : ExecutionExtensions < Block > , spawn_handle : Box < dyn SpawnNamed > , prometheus_registry : Option < Registry > , config : ClientConfig , ) -> Result < ( crate :: client :: Client < Backend < Block > , crate :: client :: LocalCallExecutor < Backend < Block > , E > , Block , RA , > , Arc < Backend < Block > > , ) , sp_blockchain :: Error , > where Block : BlockT , E : CodeExecutor + RuntimeInfo , { const CANONICALIZATION_DELAY : u64 = 4096 ; let backend = Arc :: new ( Backend :: new ( settings , CANONICALIZATION_DELAY ) ? ) ; let executor = crate :: client :: LocalCallExecutor :: new ( backend . clone ( ) , executor , spawn_handle , config . clone ( ) ) ? ; Ok ( ( crate :: client :: Client :: new ( backend . clone ( ) , executor , genesis_storage , fork_blocks , bad_blocks , execution_extensions , prometheus_registry , config , ) ? , backend , ) ) }
Create an instance of db-backed client.
Create an instance of db - backed client .
settings
DatabaseSettings
executor
E
genesis_storage
&dyn BuildStorage
fork_blocks
ForkBlocks<Block>
bad_blocks
BadBlocks<Block>
execution_extensions
ExecutionExtensions<Block>
spawn_handle
Box<dyn SpawnNamed>
prometheus_registry
Option<Registry>
config
ClientConfig
settings
DatabaseSettings
executor
E
genesis_storage
&dyn BuildStorage
fork_blocks
ForkBlocks<Block>
bad_blocks
BadBlocks<Block>
execution_extensions
ExecutionExtensions<Block>
spawn_handle
Box<dyn SpawnNamed>
prometheus_registry
Option<Registry>
config
ClientConfig