Skip to content

Commit 03a0463

Browse files
committed
Fix panic
1 parent 228ee70 commit 03a0463

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/revm/src/db/ethersdb.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ impl<M: Middleware> EthersDB<M> {
3434
/// internal utility function to call tokio feature and wait for output
3535
fn block_on<F: core::future::Future>(&self, f: F) -> F::Output {
3636
match Handle::try_current() {
37-
Ok(handle) => handle.block_on(f),
37+
Ok(handle) => {
38+
tokio::task::block_in_place(move || {
39+
handle.block_on(f)
40+
})
41+
}
3842
Err(_) => Builder::new_current_thread()
3943
.enable_all()
4044
.build()

0 commit comments

Comments
 (0)