diff --git a/core/src/rpc_service.rs b/core/src/rpc_service.rs index 99ee1cfc33..8aa8ef8571 100644 --- a/core/src/rpc_service.rs +++ b/core/src/rpc_service.rs @@ -358,6 +358,14 @@ impl JsonRpcService { let ledger_path = ledger_path.to_path_buf(); + let runtime01 = { + use tokio_01::runtime::{Builder as RuntimeBuilder, Runtime, TaskExecutor}; + RuntimeBuilder::new() + .name_prefix("rpc") + .build() + .unwrap() + }; + let (close_handle_sender, close_handle_receiver) = channel(); let thread_hdl = Builder::new() .name("solana-jsonrpc".to_string()) @@ -376,7 +384,8 @@ impl JsonRpcService { io, move |_req: &hyper::Request| request_processor.clone(), ) - .threads(rpc_threads) + .event_loop_executor(runtime01.executor()) + .threads(1) .cors(DomainsValidation::AllowOnly(vec![ AccessControlAllowOrigin::Any, ]))