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
@@ -159,7 +159,6 @@ where
transaction_pool: transaction_pool.clone(),
spawn_handle: task_manager.spawn_handle(),
import_queue,
on_demand: None,
block_announce_validator_builder: None,
warp_sync: None,
};
@@ -195,14 +194,12 @@ where
backend: backend.clone(),
task_manager: &mut task_manager,
keystore: keystore.sync_keystore(),
on_demand: None,
transaction_pool: transaction_pool.clone(),
rpc_extensions_builder: Box::new(move |_, _| {
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(ManualSealApi::to_delegate(ManualSeal::new(rpc_sink.clone())));
Ok(io)
}),
remote_blockchain: None,
network,
system_rpc_tx,
telemetry: None,
+2 -14
View File
@@ -25,10 +25,7 @@ use futures::{
};
use jsonrpc_core::MetaIoHandler;
use manual_seal::EngineCommand;
use sc_client_api::{
backend::{self, Backend},
CallExecutor, ExecutorProvider,
};
use sc_client_api::{backend::Backend, CallExecutor, ExecutorProvider};
use sc_executor::NativeElseWasmExecutor;
use sc_service::{TFullBackend, TFullCallExecutor, TFullClient, TaskManager};
use sc_transaction_pool_api::TransactionPool;
@@ -160,9 +157,6 @@ where
{
let id = BlockId::Hash(self.client.info().best_hash);
let mut overlay = OverlayedChanges::default();
let changes_trie =
backend::changes_tries_state_at_block(&id, self.backend.changes_trie_storage())
.unwrap();
let mut cache = StorageTransactionCache::<
T::Block,
<TFullBackend<T::Block> as Backend<T::Block>>::State,
@@ -176,13 +170,7 @@ where
.state_at(id.clone())
.expect(&format!("State at block {} not found", id));
let mut ext = Ext::new(
&mut overlay,
&mut cache,
&state_backend,
changes_trie.clone(),
Some(&mut extensions),
);
let mut ext = Ext::new(&mut overlay, &mut cache, &state_backend, Some(&mut extensions));
sp_externalities::set_and_run_with_externalities(&mut ext, closure)
}