@@ -41,8 +41,7 @@ use sc_network::{
41
41
} ;
42
42
use service:: {
43
43
config:: { DatabaseSource , KeystoreConfig , MultiaddrWithPeerId , WasmExecutionMethod } ,
44
- BasePath , Configuration , KeepBlocks , Role , RpcHandlers , TaskExecutor , TaskManager ,
45
- TransactionStorageMode ,
44
+ BasePath , Configuration , KeepBlocks , Role , RpcHandlers , TaskManager , TransactionStorageMode ,
46
45
} ;
47
46
use sp_arithmetic:: traits:: SaturatedConversion ;
48
47
use sp_blockchain:: HeaderBackend ;
@@ -112,7 +111,7 @@ impl ClientHandle for TestClient {
112
111
/// and can be used to make adjustments to the runtime genesis storage.
113
112
pub fn node_config (
114
113
storage_update_func : impl Fn ( ) ,
115
- task_executor : TaskExecutor ,
114
+ tokio_handle : tokio :: runtime :: Handle ,
116
115
key : Sr25519Keyring ,
117
116
boot_nodes : Vec < MultiaddrWithPeerId > ,
118
117
is_validator : bool ,
@@ -149,7 +148,7 @@ pub fn node_config(
149
148
impl_name : "polkadot-test-node" . to_string ( ) ,
150
149
impl_version : "0.1" . to_string ( ) ,
151
150
role,
152
- task_executor ,
151
+ tokio_handle ,
153
152
transaction_pool : Default :: default ( ) ,
154
153
network : network_config,
155
154
keystore : KeystoreConfig :: InMemory ,
@@ -171,7 +170,6 @@ pub fn node_config(
171
170
offchain_worker : sc_client_api:: ExecutionStrategy :: NativeWhenPossible ,
172
171
other : sc_client_api:: ExecutionStrategy :: NativeWhenPossible ,
173
172
} ,
174
- rpc_http_threads : None ,
175
173
rpc_http : None ,
176
174
rpc_ws : None ,
177
175
rpc_ipc : None ,
@@ -204,13 +202,13 @@ pub fn node_config(
204
202
/// The `storage_update_func` function will be executed in an externalities provided environment
205
203
/// and can be used to make adjustments to the runtime genesis storage.
206
204
pub fn run_validator_node (
207
- task_executor : TaskExecutor ,
205
+ tokio_handle : tokio :: runtime :: Handle ,
208
206
key : Sr25519Keyring ,
209
207
storage_update_func : impl Fn ( ) ,
210
208
boot_nodes : Vec < MultiaddrWithPeerId > ,
211
209
worker_program_path : Option < PathBuf > ,
212
210
) -> PolkadotTestNode {
213
- let config = node_config ( storage_update_func, task_executor , key, boot_nodes, true ) ;
211
+ let config = node_config ( storage_update_func, tokio_handle , key, boot_nodes, true ) ;
214
212
let multiaddr = config. network . listen_addresses [ 0 ] . clone ( ) ;
215
213
let NewFull { task_manager, client, network, rpc_handlers, overseer_handle, .. } =
216
214
new_full ( config, IsCollator :: No , worker_program_path)
@@ -236,13 +234,13 @@ pub fn run_validator_node(
236
234
/// The collator functionality still needs to be registered at the node! This can be done using
237
235
/// [`PolkadotTestNode::register_collator`].
238
236
pub fn run_collator_node (
239
- task_executor : TaskExecutor ,
237
+ tokio_handle : tokio :: runtime :: Handle ,
240
238
key : Sr25519Keyring ,
241
239
storage_update_func : impl Fn ( ) ,
242
240
boot_nodes : Vec < MultiaddrWithPeerId > ,
243
241
collator_pair : CollatorPair ,
244
242
) -> PolkadotTestNode {
245
- let config = node_config ( storage_update_func, task_executor , key, boot_nodes, false ) ;
243
+ let config = node_config ( storage_update_func, tokio_handle , key, boot_nodes, false ) ;
246
244
let multiaddr = config. network . listen_addresses [ 0 ] . clone ( ) ;
247
245
let NewFull { task_manager, client, network, rpc_handlers, overseer_handle, .. } =
248
246
new_full ( config, IsCollator :: Yes ( collator_pair) , None )
0 commit comments