reth-eth-types: Do not import JsInspectorError by default (#10202)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Nikolai Golub
2024-08-08 14:21:57 +02:00
committed by GitHub
parent 7e5414eedf
commit 340b6069c6
5 changed files with 14 additions and 6 deletions

View File

@ -27,7 +27,7 @@ reth-tasks = { workspace = true, features = ["rayon"] }
reth-transaction-pool.workspace = true
reth-chainspec.workspace = true
reth-execution-types.workspace = true
reth-rpc-eth-types.workspace = true
reth-rpc-eth-types = { workspace = true, features = ["js-tracer"] }
reth-rpc-server-types.workspace = true
reth-network-api.workspace = true
@ -55,4 +55,4 @@ optimism = [
"reth-primitives/optimism",
"revm/optimism",
"reth-provider/optimism",
]
]

View File

@ -31,7 +31,7 @@ reth-trie.workspace = true
# ethereum
alloy-sol-types.workspace = true
revm.workspace = true
revm-inspectors = { workspace = true, features = ["js-tracer"] }
revm-inspectors.workspace = true
revm-primitives = { workspace = true, features = ["dev"] }
# rpc
@ -56,3 +56,8 @@ tracing.workspace = true
[dev-dependencies]
serde_json.workspace = true
[features]
default = ["js-tracer"]
js-tracer = ["revm-inspectors/js-tracer"]

View File

@ -16,7 +16,9 @@ use reth_transaction_pool::error::{
PoolTransactionError,
};
use revm::primitives::{EVMError, ExecutionResult, HaltReason, OutOfGasError};
use revm_inspectors::tracing::{js::JsInspectorError, MuxError};
#[cfg(feature = "js-tracer")]
use revm_inspectors::tracing::js::JsInspectorError;
use revm_inspectors::tracing::MuxError;
use tracing::error;
/// Result alias
@ -191,6 +193,7 @@ impl From<EthApiError> for jsonrpsee_types::error::ErrorObject<'static> {
}
}
#[cfg(feature = "js-tracer")]
impl From<JsInspectorError> for EthApiError {
fn from(error: JsInspectorError) -> Self {
match error {

View File

@ -30,7 +30,7 @@ reth-rpc-types-compat.workspace = true
revm-inspectors = { workspace = true, features = ["js-tracer"] }
reth-network-peers = { workspace = true, features = ["secp256k1"] }
reth-evm.workspace = true
reth-rpc-eth-types.workspace = true
reth-rpc-eth-types = { workspace = true, features = ["js-tracer"] }
reth-rpc-server-types.workspace = true
reth-node-api.workspace = true
reth-network-types.workspace = true