@@ -38,7 +38,7 @@ use sc_service::{
38
38
OffchainWorkerConfig , PruningMode , TransactionStorageMode , WasmExecutionMethod ,
39
39
} ,
40
40
BasePath , ChainSpec , Configuration , Error as ServiceError , PartialComponents , Role ,
41
- RpcHandlers , TFullBackend , TFullClient , TaskExecutor , TaskManager ,
41
+ RpcHandlers , TFullBackend , TFullClient , TaskManager ,
42
42
} ;
43
43
use sp_arithmetic:: traits:: SaturatedConversion ;
44
44
use sp_blockchain:: HeaderBackend ;
@@ -375,7 +375,7 @@ enum Consensus {
375
375
/// A builder to create a [`TestNode`].
376
376
pub struct TestNodeBuilder {
377
377
para_id : ParaId ,
378
- task_executor : TaskExecutor ,
378
+ tokio_handle : tokio :: runtime :: Handle ,
379
379
key : Sr25519Keyring ,
380
380
collator_key : Option < CollatorPair > ,
381
381
parachain_nodes : Vec < MultiaddrWithPeerId > ,
@@ -391,13 +391,13 @@ impl TestNodeBuilder {
391
391
/// Create a new instance of `Self`.
392
392
///
393
393
/// `para_id` - The parachain id this node is running for.
394
- /// `task_executor ` - The task executor to use.
394
+ /// `tokio_handle ` - The tokio handler to use.
395
395
/// `key` - The key that will be used to generate the name and that will be passed as `dev_seed`.
396
- pub fn new ( para_id : ParaId , task_executor : TaskExecutor , key : Sr25519Keyring ) -> Self {
396
+ pub fn new ( para_id : ParaId , tokio_handle : tokio :: runtime :: Handle , key : Sr25519Keyring ) -> Self {
397
397
TestNodeBuilder {
398
398
key,
399
399
para_id,
400
- task_executor ,
400
+ tokio_handle ,
401
401
collator_key : None ,
402
402
parachain_nodes : Vec :: new ( ) ,
403
403
parachain_nodes_exclusive : false ,
@@ -503,7 +503,7 @@ impl TestNodeBuilder {
503
503
let parachain_config = node_config (
504
504
self . storage_update_func_parachain
505
505
. unwrap_or_else ( || Box :: new ( || ( ) ) ) ,
506
- self . task_executor . clone ( ) ,
506
+ self . tokio_handle . clone ( ) ,
507
507
self . key . clone ( ) ,
508
508
self . parachain_nodes ,
509
509
self . parachain_nodes_exclusive ,
@@ -514,7 +514,7 @@ impl TestNodeBuilder {
514
514
let mut relay_chain_config = polkadot_test_service:: node_config (
515
515
self . storage_update_func_relay_chain
516
516
. unwrap_or_else ( || Box :: new ( || ( ) ) ) ,
517
- self . task_executor ,
517
+ self . tokio_handle ,
518
518
self . key ,
519
519
self . relay_chain_nodes ,
520
520
false ,
@@ -557,7 +557,7 @@ impl TestNodeBuilder {
557
557
/// adjustments to the runtime genesis.
558
558
pub fn node_config (
559
559
storage_update_func : impl Fn ( ) ,
560
- task_executor : TaskExecutor ,
560
+ tokio_handle : tokio :: runtime :: Handle ,
561
561
key : Sr25519Keyring ,
562
562
nodes : Vec < MultiaddrWithPeerId > ,
563
563
nodes_exlusive : bool ,
@@ -609,7 +609,7 @@ pub fn node_config(
609
609
impl_name : "cumulus-test-node" . to_string ( ) ,
610
610
impl_version : "0.1" . to_string ( ) ,
611
611
role,
612
- task_executor ,
612
+ tokio_handle ,
613
613
transaction_pool : Default :: default ( ) ,
614
614
network : network_config,
615
615
keystore : KeystoreConfig :: InMemory ,
@@ -637,7 +637,6 @@ pub fn node_config(
637
637
rpc_ws : None ,
638
638
rpc_ipc : None ,
639
639
rpc_ws_max_connections : None ,
640
- rpc_http_threads : None ,
641
640
rpc_cors : None ,
642
641
rpc_methods : Default :: default ( ) ,
643
642
rpc_max_payload : None ,
@@ -686,7 +685,10 @@ impl TestNode {
686
685
let call = frame_system:: Call :: set_code { code : validation } ;
687
686
688
687
self . send_extrinsic (
689
- runtime:: SudoCall :: sudo_unchecked_weight { call : Box :: new ( call. into ( ) ) , weight : 1_000 } ,
688
+ runtime:: SudoCall :: sudo_unchecked_weight {
689
+ call : Box :: new ( call. into ( ) ) ,
690
+ weight : 1_000 ,
691
+ } ,
690
692
Sr25519Keyring :: Alice ,
691
693
)
692
694
. await
@@ -747,13 +749,13 @@ pub fn construct_extrinsic(
747
749
/// This is essentially a wrapper around
748
750
/// [`run_validator_node`](polkadot_test_service::run_validator_node).
749
751
pub fn run_relay_chain_validator_node (
750
- task_executor : TaskExecutor ,
752
+ tokio_handle : tokio :: runtime :: Handle ,
751
753
key : Sr25519Keyring ,
752
754
storage_update_func : impl Fn ( ) ,
753
755
boot_nodes : Vec < MultiaddrWithPeerId > ,
754
756
) -> polkadot_test_service:: PolkadotTestNode {
755
757
polkadot_test_service:: run_validator_node (
756
- task_executor ,
758
+ tokio_handle ,
757
759
key,
758
760
storage_update_func,
759
761
boot_nodes,
0 commit comments