diff --git a/crates/fake-rpc/src/lib.rs b/crates/fake-rpc/src/lib.rs index 1e252b6..48f88f7 100644 --- a/crates/fake-rpc/src/lib.rs +++ b/crates/fake-rpc/src/lib.rs @@ -90,10 +90,10 @@ async fn rpc( anvil.advance().await.unwrap(); } - anvil.reference_anvil.lock().await + anvil.main_anvil.lock().await } "eth_getTransactionReceipt" => anvil.main_anvil.lock().await, - "eth_getTransactionByHash" => anvil.reference_anvil.lock().await, + "eth_getTransactionByHash" => anvil.main_anvil.lock().await, _ => anvil.main_anvil.lock().await, }; diff --git a/src/server.rs b/src/server.rs index 0bf6b5a..41295c6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -95,6 +95,7 @@ pub async fn spawn_server( let router = Router::new() .nest("/1", v1_routes) + .route("/health", get(routes::health)) .layer(tower_http::trace::TraceLayer::new_for_http()) .layer(axum::middleware::from_fn(middleware::log_response)); diff --git a/src/server/routes.rs b/src/server/routes.rs index 4675703..de17332 100644 --- a/src/server/routes.rs +++ b/src/server/routes.rs @@ -1,3 +1,9 @@ +use hyper::StatusCode; + pub mod network; pub mod relayer; pub mod transaction; + +pub async fn health() -> StatusCode { + StatusCode::OK +}