@@ -23,7 +23,7 @@ use crate::{
2323 } ,
2424 params:: { DatabaseParams , PruningParams } ,
2525} ;
26- use clap:: { Args , ValueEnum } ;
26+ use clap:: Args ;
2727use std:: path:: PathBuf ;
2828
2929/// Parameters for block import.
@@ -80,38 +80,6 @@ pub struct ImportParams {
8080 /// Providing `0` will disable the cache.
8181 #[ arg( long, value_name = "Bytes" , default_value_t = 1024 * 1024 * 1024 ) ]
8282 pub trie_cache_size : usize ,
83-
84- /// Warm up the trie cache.
85- ///
86- /// No warmup if flag is not present. Using flag without value chooses non-blocking warmup.
87- #[ arg( long, value_name = "STRATEGY" , value_enum, num_args = 0 ..=1 , default_missing_value = "non-blocking" ) ]
88- pub warm_up_trie_cache : Option < TrieCacheWarmUpStrategy > ,
89- }
90-
91- /// Warmup strategy for the trie cache.
92- #[ derive( Debug , Clone , Copy , ValueEnum ) ]
93- pub enum TrieCacheWarmUpStrategy {
94- /// Warm up the cache in a non-blocking way.
95- #[ clap( name = "non-blocking" ) ]
96- NonBlocking ,
97- /// Warm up the cache in a blocking way (not recommended for production use).
98- ///
99- /// When enabled, the trie cache warm-up will block the node startup until complete.
100- /// This is not recommended for production use as it can significantly delay node startup.
101- /// Only enable this option for testing or debugging purposes.
102- #[ clap( name = "blocking" ) ]
103- Blocking ,
104- }
105-
106- impl From < TrieCacheWarmUpStrategy > for sc_service:: config:: TrieCacheWarmUpStrategy {
107- fn from ( strategy : TrieCacheWarmUpStrategy ) -> Self {
108- match strategy {
109- TrieCacheWarmUpStrategy :: NonBlocking =>
110- sc_service:: config:: TrieCacheWarmUpStrategy :: NonBlocking ,
111- TrieCacheWarmUpStrategy :: Blocking =>
112- sc_service:: config:: TrieCacheWarmUpStrategy :: Blocking ,
113- }
114- }
11583}
11684
11785impl ImportParams {
@@ -124,11 +92,6 @@ impl ImportParams {
12492 }
12593 }
12694
127- /// Specify if we should warm up the trie cache.
128- pub fn warm_up_trie_cache ( & self ) -> Option < TrieCacheWarmUpStrategy > {
129- self . warm_up_trie_cache
130- }
131-
13295 /// Get the WASM execution method from the parameters
13396 pub fn wasm_method ( & self ) -> sc_service:: config:: WasmExecutionMethod {
13497 self . execution_strategies . check_usage_and_print_deprecation_warning ( ) ;
0 commit comments