Skip to content

Commit

Permalink
use tokio tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Oct 25, 2024
1 parent 0857c56 commit 2608ac4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@ where
// modified_block.body.transactions = txs;
modified_block.body.transactions = vec![txs];

let handle = std::thread::spawn(move || {
tokio::task::spawn_blocking(move || {
let cached_state_provider = CachedStateProvider::new(
cloned_state_provider,
cloned_code_cache,
Expand All @@ -2236,9 +2236,6 @@ where
executor_provider.executor(StateProviderDatabase::new(&cached_state_provider));
let _ = executor.execute((&modified_block, U256::MAX).into());
});

// Detach the thread
drop(handle);
}

info!(target: "engine::tree", "Finished spawning tx parallel threads");
Expand Down

0 comments on commit 2608ac4

Please sign in to comment.