Skip to content

Commit

Permalink
fix: use current runtime handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Oct 25, 2024
1 parent 2608ac4 commit 6c58fba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2223,17 +2223,16 @@ where
let mut modified_block = block.clone();
// modified_block.body.transactions = txs;
modified_block.body.transactions = vec![txs];

tokio::task::spawn_blocking(move || {
tokio::runtime::Handle::current().spawn_blocking(move || {
let cached_state_provider = CachedStateProvider::new(
cloned_state_provider,
cloned_code_cache,
cloned_storage_cache,
cloned_account_cache,
cloned_metrics,
);
let executor =
executor_provider.executor(StateProviderDatabase::new(&cached_state_provider));
let executor = executor_provider
.executor(StateProviderDatabase::new(&cached_state_provider));
let _ = executor.execute((&modified_block, U256::MAX).into());
});
}
Expand Down

0 comments on commit 6c58fba

Please sign in to comment.