Skip to content

Commit

Permalink
Merge branch 'main' into importer-component
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-aranha-cw authored Aug 2, 2024
2 parents f2552f2 + 78b709b commit 19a3153
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/eth/executor/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use anyhow::anyhow;
use tracing::info_span;
use tracing::Span;

#[cfg(feature = "metrics")]
use crate::eth::codegen;
use crate::eth::executor::Evm;
use crate::eth::executor::EvmExecutionResult;
Expand Down
1 change: 0 additions & 1 deletion src/eth/rpc/rpc_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub struct RpcContext {

// services
pub executor: Arc<Executor>,
#[allow(dead_code)] // HACK this was triggered in Rust 1.79
pub miner: Arc<Miner>,
pub storage: Arc<StratusStorage>,
pub consensus: Arc<dyn Consensus>,
Expand Down
3 changes: 3 additions & 0 deletions src/eth/rpc/rpc_middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use crate::eth::rpc::RpcClientApp;
use crate::event_with;
use crate::ext::from_json_str;
use crate::ext::to_json_value;
#[cfg(feature = "metrics")]
use crate::if_else;
use crate::infra::metrics;
use crate::infra::tracing::new_cid;
Expand Down Expand Up @@ -164,6 +165,8 @@ impl<'a> Future for RpcResponse<'a> {
// trace response
let response_success = response.is_success();
let response_result: JsonValue = from_json_str(response.as_result());

#[cfg_attr(not(feature = "metrics"), allow(unused_variables))]
let (level, error_code) = match response_result
.get("error")
.and_then(|v| v.get("code"))
Expand Down
1 change: 1 addition & 0 deletions src/eth/storage/rocks/rocks_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ impl RocksStorageState {
/// Get the filename of the database path.
///
/// Should be checked on creation.
#[cfg(feature = "metrics")]
fn db_path_filename(&self) -> &str {
self.db.path().file_name().unwrap().to_str().unwrap()
}
Expand Down

0 comments on commit 19a3153

Please sign in to comment.