diff --git a/crates/gateway/Cargo.toml b/crates/gateway/Cargo.toml index 16a90fb6..e354515c 100644 --- a/crates/gateway/Cargo.toml +++ b/crates/gateway/Cargo.toml @@ -8,6 +8,9 @@ license.workspace = true [lints] workspace = true +[features] +testing = [] + [dependencies] axum.workspace = true blockifier.workspace = true diff --git a/crates/gateway/src/config.rs b/crates/gateway/src/config.rs index b7c53c51..783b658f 100644 --- a/crates/gateway/src/config.rs +++ b/crates/gateway/src/config.rs @@ -82,6 +82,7 @@ pub struct RpcStateReaderConfig { pub json_rpc_version: String, } +#[cfg(any(feature = "testing", test))] impl RpcStateReaderConfig { pub fn create_for_testing() -> Self { Self { url: "http://localhost:8080".to_string(), json_rpc_version: "2.0".to_string() }