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:
Arkadiy Paronyan
2021-11-12 14:15:01 +01:00
committed by GitHub
parent 112b7dac47
commit 4cbbf0cf43
141 changed files with 532 additions and 17807 deletions
-35
View File
@@ -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
}