diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index f8980c8a1cf0..f476417bd5dd 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -2196,16 +2196,18 @@ where info!(target: "engine::tree", "Starting to spawn tx parallel threads"); // We reserve 2 cores for the rest of the system - const RESERVED: usize = 2; + // const RESERVED: usize = 2; - let threads = std::thread::available_parallelism() - .map_or(25, |cpus| max(cpus.get().saturating_sub(RESERVED), RESERVED)); + // let threads = std::thread::available_parallelism() + // .map_or(25, |cpus| max(cpus.get().saturating_sub(RESERVED), RESERVED)); - let mut sections = vec![vec![]; threads]; - for (curr_section, tx) in block.body.transactions().enumerate() { - let idx = curr_section % sections.len(); - sections[idx].push(tx.clone()); - } + // let mut sections = vec![vec![]; threads]; + // for (curr_section, tx) in block.body.transactions().enumerate() { + // let idx = curr_section % sections.len(); + // sections[idx].push(tx.clone()); + // } + + let sections = block.body.transactions().cloned(); // Execute all transactions in parallel and discard the result for txs in sections { @@ -2219,7 +2221,8 @@ where // modify the block to contain only let mut modified_block = block.clone(); - modified_block.body.transactions = txs; + // modified_block.body.transactions = txs; + modified_block.body.transactions = vec![txs]; let handle = std::thread::spawn(move || { let cached_state_provider = CachedStateProvider::new(