mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Kill the light client, CHTs and change tries. (#10080)
* Remove light client, change tries and CHTs * Update tests * fmt * Restore changes_root * Fixed benches * Cargo fmt * fmt * fmt
This commit is contained in:
@@ -51,18 +51,6 @@ use sp_consensus::SelectChain;
|
||||
use sp_consensus_babe::BabeApi;
|
||||
use sp_keystore::SyncCryptoStorePtr;
|
||||
|
||||
/// Light client extra dependencies.
|
||||
pub struct LightDeps<C, F, P> {
|
||||
/// The client instance to use.
|
||||
pub client: Arc<C>,
|
||||
/// Transaction pool instance.
|
||||
pub pool: Arc<P>,
|
||||
/// Remote access to the blockchain (async).
|
||||
pub remote_blockchain: Arc<dyn sc_client_api::light::RemoteBlockchain<Block>>,
|
||||
/// Fetcher instance.
|
||||
pub fetcher: Arc<F>,
|
||||
}
|
||||
|
||||
/// Extra dependencies for BABE.
|
||||
pub struct BabeDeps {
|
||||
/// BABE protocol config.
|
||||
@@ -183,26 +171,3 @@ where
|
||||
|
||||
Ok(io)
|
||||
}
|
||||
|
||||
/// Instantiate all Light RPC extensions.
|
||||
pub fn create_light<C, P, M, F>(deps: LightDeps<C, F, P>) -> jsonrpc_core::IoHandler<M>
|
||||
where
|
||||
C: sp_blockchain::HeaderBackend<Block>,
|
||||
C: Send + Sync + 'static,
|
||||
F: sc_client_api::light::Fetcher<Block> + 'static,
|
||||
P: TransactionPool + 'static,
|
||||
M: jsonrpc_core::Metadata + Default,
|
||||
{
|
||||
use substrate_frame_rpc_system::{LightSystem, SystemApi};
|
||||
|
||||
let LightDeps { client, pool, remote_blockchain, fetcher } = deps;
|
||||
let mut io = jsonrpc_core::IoHandler::default();
|
||||
io.extend_with(SystemApi::<Hash, AccountId, Index>::to_delegate(LightSystem::new(
|
||||
client,
|
||||
remote_blockchain,
|
||||
fetcher,
|
||||
pool,
|
||||
)));
|
||||
|
||||
io
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user