From 3cbe5951dba2b6d987f9ebb52e4ba5f3d0e3c289 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Mon, 27 Feb 2023 01:48:50 +0000 Subject: [PATCH] node-rpc-ext: Remove rayon --- Cargo.lock | 1 - crates/phala-node-rpc-ext/Cargo.toml | 3 --- crates/phala-node-rpc-ext/src/storage_changes.rs | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50433d253a..3b5261a452 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7818,7 +7818,6 @@ dependencies = [ "phala-mq", "phala-node-rpc-ext-types", "phala-pallets", - "rayon", "sc-client-api", "sc-rpc", "sc-transaction-pool-api", diff --git a/crates/phala-node-rpc-ext/Cargo.toml b/crates/phala-node-rpc-ext/Cargo.toml index 229e9e1b9a..3e560df0cb 100644 --- a/crates/phala-node-rpc-ext/Cargo.toml +++ b/crates/phala-node-rpc-ext/Cargo.toml @@ -32,6 +32,3 @@ phala-mq = { path = "../../crates/phala-mq" } phala-pallets = { path = "../../pallets/phala" } pallet-mq-runtime-api = { path = "../../pallets/phala/mq-runtime-api" } ext-types = { path = "./types", package = "phala-node-rpc-ext-types" } - -rayon = "1" - diff --git a/crates/phala-node-rpc-ext/src/storage_changes.rs b/crates/phala-node-rpc-ext/src/storage_changes.rs index 250607137a..25b983e5f2 100644 --- a/crates/phala-node-rpc-ext/src/storage_changes.rs +++ b/crates/phala-node-rpc-ext/src/storage_changes.rs @@ -1,6 +1,5 @@ use super::*; pub use ext_types::*; -use rayon::prelude::*; /// State RPC errors. #[derive(Debug, thiserror::Error)] @@ -107,7 +106,7 @@ where } headers - .into_par_iter() + .into_iter() .map(|(id, mut header)| -> Result<_, Error> { let api = client.runtime_api(); let hash = client.expect_block_hash_from_id(&id).expect("Should get the block hash");