Skip to content

Commit

Permalink
fix: must run on tokio runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
cuiweixie committed Aug 9, 2024
1 parent 158fd77 commit e6ad9ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/evm/core/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use alloy_json_abi::{Error, JsonAbi};
use alloy_primitives::{hex, Log, Selector};
use alloy_sol_types::{SolCall, SolError, SolEventInterface, SolInterface, SolValue};
use foundry_common::{abi::get_error, selectors::decode_function_selector, SELECTOR_LEN};
use futures::executor::block_on;
use itertools::Itertools;
use revm::interpreter::InstructionResult;
use rustc_hash::FxHashMap;
Expand Down Expand Up @@ -185,7 +184,8 @@ impl RevertDecoder {
let encoded_selector = hex::encode(selector);

thread::spawn(move || {
let result = block_on(decode_function_selector(&encoded_selector));
let rt = tokio::runtime::Runtime::new().unwrap();
let result = rt.block_on(decode_function_selector(&encoded_selector));
tx.send(result).unwrap();
});

Expand Down

0 comments on commit e6ad9ab

Please sign in to comment.