mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-25 02:31:08 +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:
@@ -30,9 +30,8 @@ use log::info;
|
||||
use prometheus_endpoint::Registry;
|
||||
use sc_chain_spec::get_extension;
|
||||
use sc_client_api::{
|
||||
execution_extensions::ExecutionExtensions, light::RemoteBlockchain,
|
||||
proof_provider::ProofProvider, BadBlocks, BlockBackend, BlockchainEvents, ExecutorProvider,
|
||||
ForkBlocks, StorageProvider, UsageProvider,
|
||||
execution_extensions::ExecutionExtensions, proof_provider::ProofProvider, BadBlocks,
|
||||
BlockBackend, BlockchainEvents, ExecutorProvider, ForkBlocks, StorageProvider, UsageProvider,
|
||||
};
|
||||
use sc_client_db::{Backend, DatabaseSettings};
|
||||
use sc_consensus::import_queue::ImportQueue;
|
||||
@@ -40,7 +39,7 @@ use sc_executor::RuntimeVersionOf;
|
||||
use sc_keystore::LocalKeystore;
|
||||
use sc_network::{
|
||||
block_request_handler::{self, BlockRequestHandler},
|
||||
config::{OnDemand, Role, SyncMode},
|
||||
config::{Role, SyncMode},
|
||||
light_client_requests::{self, handler::LightClientRequestHandler},
|
||||
state_request_handler::{self, StateRequestHandler},
|
||||
warp_request_handler::{self, RequestHandler as WarpSyncRequestHandler, WarpSyncProvider},
|
||||
@@ -381,23 +380,19 @@ where
|
||||
pub struct SpawnTasksParams<'a, TBl: BlockT, TCl, TExPool, TRpc, Backend> {
|
||||
/// The service configuration.
|
||||
pub config: Configuration,
|
||||
/// A shared client returned by `new_full_parts`/`new_light_parts`.
|
||||
/// A shared client returned by `new_full_parts`.
|
||||
pub client: Arc<TCl>,
|
||||
/// A shared backend returned by `new_full_parts`/`new_light_parts`.
|
||||
/// A shared backend returned by `new_full_parts`.
|
||||
pub backend: Arc<Backend>,
|
||||
/// A task manager returned by `new_full_parts`/`new_light_parts`.
|
||||
/// A task manager returned by `new_full_parts`.
|
||||
pub task_manager: &'a mut TaskManager,
|
||||
/// A shared keystore returned by `new_full_parts`/`new_light_parts`.
|
||||
/// A shared keystore returned by `new_full_parts`.
|
||||
pub keystore: SyncCryptoStorePtr,
|
||||
/// An optional, shared data fetcher for light clients.
|
||||
pub on_demand: Option<Arc<OnDemand<TBl>>>,
|
||||
/// A shared transaction pool.
|
||||
pub transaction_pool: Arc<TExPool>,
|
||||
/// A RPC extension builder. Use `NoopRpcExtensionBuilder` if you just want to pass in the
|
||||
/// extensions directly.
|
||||
pub rpc_extensions_builder: Box<dyn RpcExtensionBuilder<Output = TRpc> + Send>,
|
||||
/// An optional, shared remote blockchain instance. Used for light clients.
|
||||
pub remote_blockchain: Option<Arc<dyn RemoteBlockchain<TBl>>>,
|
||||
/// A shared network instance.
|
||||
pub network: Arc<NetworkService<TBl, <TBl as BlockT>::Hash>>,
|
||||
/// A Sender for RPC requests.
|
||||
@@ -475,12 +470,10 @@ where
|
||||
mut config,
|
||||
task_manager,
|
||||
client,
|
||||
on_demand: _,
|
||||
backend,
|
||||
keystore,
|
||||
transaction_pool,
|
||||
rpc_extensions_builder,
|
||||
remote_blockchain: _,
|
||||
network,
|
||||
system_rpc_tx,
|
||||
telemetry,
|
||||
@@ -725,7 +718,7 @@ where
|
||||
pub struct BuildNetworkParams<'a, TBl: BlockT, TExPool, TImpQu, TCl> {
|
||||
/// The service configuration.
|
||||
pub config: &'a Configuration,
|
||||
/// A shared client returned by `new_full_parts`/`new_light_parts`.
|
||||
/// A shared client returned by `new_full_parts`.
|
||||
pub client: Arc<TCl>,
|
||||
/// A shared transaction pool.
|
||||
pub transaction_pool: Arc<TExPool>,
|
||||
@@ -733,8 +726,6 @@ pub struct BuildNetworkParams<'a, TBl: BlockT, TExPool, TImpQu, TCl> {
|
||||
pub spawn_handle: SpawnTaskHandle,
|
||||
/// An import queue.
|
||||
pub import_queue: TImpQu,
|
||||
/// An optional, shared data fetcher for light clients.
|
||||
pub on_demand: Option<Arc<OnDemand<TBl>>>,
|
||||
/// A block announce validator builder.
|
||||
pub block_announce_validator_builder:
|
||||
Option<Box<dyn FnOnce(Arc<TCl>) -> Box<dyn BlockAnnounceValidator<TBl> + Send> + Send>>,
|
||||
@@ -773,7 +764,6 @@ where
|
||||
transaction_pool,
|
||||
spawn_handle,
|
||||
import_queue,
|
||||
on_demand,
|
||||
block_announce_validator_builder,
|
||||
warp_sync,
|
||||
} = params;
|
||||
@@ -869,7 +859,6 @@ where
|
||||
},
|
||||
network_config: config.network.clone(),
|
||||
chain: client.clone(),
|
||||
on_demand,
|
||||
transaction_pool: transaction_pool_adapter as _,
|
||||
import_queue: Box::new(import_queue),
|
||||
protocol_id,
|
||||
|
||||
Reference in New Issue
Block a user