Skip to content

Commit 4c6b127

Browse files
committed
wip
1 parent 4c4f653 commit 4c6b127

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

crates/grpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tower-service.workspace = true
4545
[dev-dependencies]
4646
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
4747
hex = "0.4"
48-
katana-utils = { workspace = true, features = ["grpc"] }
48+
katana-utils = { workspace = true, features = ["node"] }
4949

5050
[build-dependencies]
5151
tonic-build.workspace = true

crates/utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ tempfile = { workspace = true, optional = true }
3636

3737
[features]
3838
node = [
39+
"katana-node/grpc",
3940
"clap",
4041
"katana-chain-spec",
4142
"katana-core",
@@ -48,7 +49,6 @@ node = [
4849
"tempfile",
4950
]
5051
explorer = [ "node", "katana-node/explorer" ]
51-
grpc = [ "node", "katana-node/grpc" ]
5252

5353
[[bin]]
5454
name = "generate_migration_db"

crates/utils/src/node.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::net::SocketAddr;
33
use std::path::{Path, PathBuf};
44
use std::process::Command;
55
use std::sync::Arc;
6-
#[cfg(feature = "grpc")]
76
use std::time::Duration;
87

98
use fs2::FileExt;
@@ -15,7 +14,6 @@ use katana_chain_spec::{dev, ChainSpec};
1514
use katana_core::backend::Backend;
1615
use katana_executor::implementation::blockifier::BlockifierFactory;
1716
use katana_node::config::dev::DevConfig;
18-
#[cfg(feature = "grpc")]
1917
use katana_node::config::grpc::{GrpcConfig, DEFAULT_GRPC_ADDR};
2018
use katana_node::config::rpc::{RpcConfig, RpcModulesList, DEFAULT_RPC_ADDR};
2119
use katana_node::config::sequencing::SequencingConfig;
@@ -203,7 +201,6 @@ where
203201
}
204202

205203
/// Returns the address of the node's gRPC server (if enabled).
206-
#[cfg(feature = "grpc")]
207204
pub fn grpc_addr(&self) -> Option<&SocketAddr> {
208205
self.node.grpc().map(|h| h.addr())
209206
}
@@ -386,20 +383,11 @@ pub fn test_config() -> Config {
386383
..Default::default()
387384
};
388385

389-
#[cfg(feature = "grpc")]
390386
let grpc = Some(GrpcConfig {
391387
addr: DEFAULT_GRPC_ADDR,
392388
port: 0, // Use port 0 for auto-assignment
393389
timeout: Some(Duration::from_secs(30)),
394390
});
395391

396-
Config {
397-
sequencing,
398-
rpc,
399-
dev,
400-
chain: ChainSpec::Dev(chain).into(),
401-
#[cfg(feature = "grpc")]
402-
grpc,
403-
..Default::default()
404-
}
392+
Config { sequencing, rpc, dev, chain: ChainSpec::Dev(chain).into(), grpc, ..Default::default() }
405393
}

0 commit comments

Comments
 (0)