mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 03:58:04 +00:00
Name all the tasks! (#6726)
* Remove any implementation of `Spawn` or `Executor` from our task executors * Fix compilation * Rename `SpawnBlockingExecutor` * Update primitives/core/src/traits.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Fix tests Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -24,8 +24,7 @@ use crate::{
|
||||
config::{Configuration, KeystoreConfig, PrometheusConfig, OffchainWorkerConfig},
|
||||
};
|
||||
use sc_client_api::{
|
||||
light::RemoteBlockchain, ForkBlocks, BadBlocks, CloneableSpawn, UsageProvider,
|
||||
ExecutorProvider,
|
||||
light::RemoteBlockchain, ForkBlocks, BadBlocks, UsageProvider, ExecutorProvider,
|
||||
};
|
||||
use sp_utils::mpsc::{tracing_unbounded, TracingUnboundedSender, TracingUnboundedReceiver};
|
||||
use sc_chain_spec::get_extension;
|
||||
@@ -55,7 +54,7 @@ use sc_telemetry::{telemetry, SUBSTRATE_INFO};
|
||||
use sp_transaction_pool::MaintainedTransactionPool;
|
||||
use prometheus_endpoint::Registry;
|
||||
use sc_client_db::{Backend, DatabaseSettings};
|
||||
use sp_core::traits::CodeExecutor;
|
||||
use sp_core::traits::{CodeExecutor, SpawnNamed};
|
||||
use sp_runtime::BuildStorage;
|
||||
use sc_client_api::{
|
||||
BlockBackend, BlockchainEvents,
|
||||
@@ -334,7 +333,7 @@ pub fn new_client<E, Block, RA>(
|
||||
fork_blocks: ForkBlocks<Block>,
|
||||
bad_blocks: BadBlocks<Block>,
|
||||
execution_extensions: ExecutionExtensions<Block>,
|
||||
spawn_handle: Box<dyn CloneableSpawn>,
|
||||
spawn_handle: Box<dyn SpawnNamed>,
|
||||
prometheus_registry: Option<Registry>,
|
||||
config: ClientConfig,
|
||||
) -> Result<(
|
||||
@@ -750,7 +749,8 @@ fn gen_handler<TBl, TBackend, TExPool, TRpc, TCl>(
|
||||
chain_type: config.chain_spec.chain_type(),
|
||||
};
|
||||
|
||||
let subscriptions = SubscriptionManager::new(Arc::new(spawn_handle));
|
||||
let task_executor = sc_rpc::SubscriptionTaskExecutor::new(spawn_handle);
|
||||
let subscriptions = SubscriptionManager::new(Arc::new(task_executor));
|
||||
|
||||
let (chain, state, child_state) = if let (Some(remote_blockchain), Some(on_demand)) =
|
||||
(remote_blockchain, on_demand) {
|
||||
|
||||
Reference in New Issue
Block a user