File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -525,6 +525,15 @@ impl SequencerNodeArgs {
525525 self . cartridge . merge ( config. cartridge . as_ref ( ) ) ;
526526 }
527527
528+ #[ cfg( feature = "explorer" ) ]
529+ {
530+ if !self . explorer . explorer {
531+ if let Some ( explorer) = & config. explorer {
532+ self . explorer . explorer = explorer. explorer ;
533+ }
534+ }
535+ }
536+
528537 Ok ( self )
529538 }
530539
@@ -729,6 +738,9 @@ total_accounts = 20
729738validate_max_steps = 500
730739invoke_max_steps = 9988
731740chain_id.Named = "Mainnet"
741+
742+ [explorer]
743+ explorer = true
732744 "# ;
733745 let path = std:: env:: temp_dir ( ) . join ( "katana-config.json" ) ;
734746 std:: fs:: write ( & path, content) . unwrap ( ) ;
@@ -772,6 +784,9 @@ chain_id.Named = "Mainnet"
772784 assert_eq ! ( config. chain. genesis( ) . gas_prices. eth. get( ) , 9999 ) ;
773785 assert_eq ! ( config. chain. genesis( ) . gas_prices. strk. get( ) , 8888 ) ;
774786 assert_eq ! ( config. chain. id( ) , ChainId :: Id ( Felt :: from_str( "0x123" ) . unwrap( ) ) ) ;
787+
788+ #[ cfg( feature = "explorer" ) ]
789+ assert ! ( config. rpc. explorer) ;
775790 }
776791
777792 #[ test]
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ pub struct NodeArgsConfig {
2727 pub metrics : Option < MetricsOptions > ,
2828 #[ cfg( feature = "cartridge" ) ]
2929 pub cartridge : Option < CartridgeOptions > ,
30+ #[ cfg( feature = "explorer" ) ]
31+ pub explorer : Option < ExplorerOptions > ,
3032}
3133
3234impl NodeArgsConfig {
@@ -82,6 +84,15 @@ impl TryFrom<SequencerNodeArgs> for NodeArgsConfig {
8284 } ;
8385 }
8486
87+ #[ cfg( feature = "explorer" ) ]
88+ {
89+ node_config. explorer = if args. explorer == ExplorerOptions :: default ( ) {
90+ None
91+ } else {
92+ Some ( args. explorer )
93+ } ;
94+ }
95+
8596 Ok ( node_config)
8697 }
8798}
You can’t perform that action at this time.
0 commit comments