pub struct ImportParams {
pub pruning_params: PruningParams,
pub database_params: DatabaseParams,
pub wasm_method: WasmExecutionMethod,
pub wasmtime_instantiation_strategy: WasmtimeInstantiationStrategy,
pub wasm_runtime_overrides: Option<PathBuf>,
pub execution_strategies: ExecutionStrategiesParams,
pub trie_cache_size: usize,
pub warm_up_trie_cache: Option<TrieCacheWarmUpStrategy>,
}Expand description
Parameters for block import.
Fields§
§pruning_params: PruningParams§database_params: DatabaseParams§wasm_method: WasmExecutionMethodMethod for executing Wasm runtime code.
wasmtime_instantiation_strategy: WasmtimeInstantiationStrategyThe WASM instantiation method to use.
Only has an effect when wasm-execution is set to compiled.
The copy-on-write strategies are only supported on Linux.
If the copy-on-write variant of a strategy is unsupported
the executor will fall back to the non-CoW equivalent.
The fastest (and the default) strategy available is pooling-copy-on-write.
The legacy-instance-reuse strategy is deprecated and will
be removed in the future. It should only be used in case of
issues with the default instantiation strategy.
wasm_runtime_overrides: Option<PathBuf>Specify the path where local WASM runtimes are stored.
These runtimes will override on-chain runtimes when the version matches.
execution_strategies: ExecutionStrategiesParams§trie_cache_size: usizeSpecify the state cache size.
Providing 0 will disable the cache.
warm_up_trie_cache: Option<TrieCacheWarmUpStrategy>Warm up the trie cache.
No warmup if flag is not present. Using flag without value chooses non-blocking warmup.
Implementations§
Source§impl ImportParams
impl ImportParams
Sourcepub fn trie_cache_maximum_size(&self) -> Option<usize>
pub fn trie_cache_maximum_size(&self) -> Option<usize>
Specify the trie cache maximum size.
Sourcepub fn warm_up_trie_cache(&self) -> Option<TrieCacheWarmUpStrategy>
pub fn warm_up_trie_cache(&self) -> Option<TrieCacheWarmUpStrategy>
Specify if we should warm up the trie cache.
Sourcepub fn wasm_method(&self) -> WasmExecutionMethod
pub fn wasm_method(&self) -> WasmExecutionMethod
Get the WASM execution method from the parameters
Sourcepub fn wasm_runtime_overrides(&self) -> Option<PathBuf>
pub fn wasm_runtime_overrides(&self) -> Option<PathBuf>
Enable overriding on-chain WASM with locally-stored WASM by specifying the path where local WASM is stored.
Trait Implementations§
Source§impl Args for ImportParams
impl Args for ImportParams
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§impl Clone for ImportParams
impl Clone for ImportParams
Source§fn clone(&self) -> ImportParams
fn clone(&self) -> ImportParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImportParams
impl Debug for ImportParams
Source§impl FromArgMatches for ImportParams
impl FromArgMatches for ImportParams
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for ImportParams
impl RefUnwindSafe for ImportParams
impl Send for ImportParams
impl Sync for ImportParams
impl Unpin for ImportParams
impl UnwindSafe for ImportParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.