@@ -3,7 +3,6 @@ use std::net::SocketAddr;
33use std:: path:: { Path , PathBuf } ;
44use std:: process:: Command ;
55use std:: sync:: Arc ;
6- #[ cfg( feature = "grpc" ) ]
76use std:: time:: Duration ;
87
98use fs2:: FileExt ;
@@ -15,7 +14,6 @@ use katana_chain_spec::{dev, ChainSpec};
1514use katana_core:: backend:: Backend ;
1615use katana_executor:: implementation:: blockifier:: BlockifierFactory ;
1716use katana_node:: config:: dev:: DevConfig ;
18- #[ cfg( feature = "grpc" ) ]
1917use katana_node:: config:: grpc:: { GrpcConfig , DEFAULT_GRPC_ADDR } ;
2018use katana_node:: config:: rpc:: { RpcConfig , RpcModulesList , DEFAULT_RPC_ADDR } ;
2119use 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