Struct sc_cli::CheckBlockCmd
source · [−]pub struct CheckBlockCmd {
pub input: BlockNumberOrHash,
pub default_heap_pages: Option<u32>,
pub shared_params: SharedParams,
pub import_params: ImportParams,
}
Expand description
The check-block
command used to validate blocks.
Fields
input: BlockNumberOrHash
Block hash or number
default_heap_pages: Option<u32>
The default number of 64KB pages to ever allocate for Wasm execution.
Don’t alter this unless you know what you’re doing.
import_params: ImportParams
Implementations
sourceimpl CheckBlockCmd
impl CheckBlockCmd
sourcepub async fn run<B, C, IQ>(
&self,
client: Arc<C>,
import_queue: IQ
) -> Result<()> where
B: BlockT + for<'de> Deserialize<'de>,
C: BlockBackend<B> + UsageProvider<B> + Send + Sync + 'static,
IQ: ImportQueue<B> + 'static,
B::Hash: FromStr,
<B::Hash as FromStr>::Err: Debug,
<<B::Header as HeaderT>::Number as FromStr>::Err: Debug,
pub async fn run<B, C, IQ>(
&self,
client: Arc<C>,
import_queue: IQ
) -> Result<()> where
B: BlockT + for<'de> Deserialize<'de>,
C: BlockBackend<B> + UsageProvider<B> + Send + Sync + 'static,
IQ: ImportQueue<B> + 'static,
B::Hash: FromStr,
<B::Hash as FromStr>::Err: Debug,
<<B::Header as HeaderT>::Number as FromStr>::Err: Debug,
Run the check-block command
Trait Implementations
sourceimpl CliConfiguration<()> for CheckBlockCmd
impl CliConfiguration<()> for CheckBlockCmd
Get the SharedParams for this object
sourcefn import_params(&self) -> Option<&ImportParams>
fn import_params(&self) -> Option<&ImportParams>
Get the ImportParams for this object
sourcefn pruning_params(&self) -> Option<&PruningParams>
fn pruning_params(&self) -> Option<&PruningParams>
Get the PruningParams for this object
sourcefn keystore_params(&self) -> Option<&KeystoreParams>
fn keystore_params(&self) -> Option<&KeystoreParams>
Get the KeystoreParams for this object
sourcefn network_params(&self) -> Option<&NetworkParams>
fn network_params(&self) -> Option<&NetworkParams>
Get the NetworkParams for this object
sourcefn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
Get a reference to OffchainWorkerParams
for this object.
sourcefn node_key_params(&self) -> Option<&NodeKeyParams>
fn node_key_params(&self) -> Option<&NodeKeyParams>
Get the NodeKeyParams for this object
sourcefn database_params(&self) -> Option<&DatabaseParams>
fn database_params(&self) -> Option<&DatabaseParams>
Get the DatabaseParams for this object
sourcefn base_path(&self) -> Result<Option<BasePath>>
fn base_path(&self) -> Result<Option<BasePath>>
Get the base path of the configuration (if any) Read more
sourcefn transaction_pool(&self) -> Result<TransactionPoolOptions>
fn transaction_pool(&self) -> Result<TransactionPoolOptions>
Get the transaction pool options Read more
sourcefn network_config(
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
Get the network configuration Read more
sourcefn keystore_config(
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig)>
fn keystore_config(
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig)>
Get the keystore configuration. Read more
sourcefn database_transaction_storage(&self) -> Result<TransactionStorageMode>
fn database_transaction_storage(&self) -> Result<TransactionStorageMode>
Get the database transaction storage scheme.
sourcefn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseConfig>
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseConfig>
Get the database configuration object for the parameters provided
sourcefn state_cache_size(&self) -> Result<usize>
fn state_cache_size(&self) -> Result<usize>
Get the state cache size. Read more
sourcefn state_cache_child_ratio(&self) -> Result<Option<usize>>
fn state_cache_child_ratio(&self) -> Result<Option<usize>>
Get the state cache child ratio (if any). Read more
sourcefn state_pruning(
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode>
fn state_pruning(
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode>
Get the state pruning mode. Read more
sourcefn keep_blocks(&self) -> Result<KeepBlocks>
fn keep_blocks(&self) -> Result<KeepBlocks>
Get the block pruning mode. Read more
sourcefn wasm_method(&self) -> Result<WasmExecutionMethod>
fn wasm_method(&self) -> Result<WasmExecutionMethod>
Get the WASM execution method. Read more
sourcefn wasm_runtime_overrides(&self) -> Option<PathBuf>
fn wasm_runtime_overrides(&self) -> Option<PathBuf>
Get the path where WASM overrides live. Read more
sourcefn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
fn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
Get the execution strategies. Read more
sourcefn rpc_http(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
fn rpc_http(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
Get the RPC HTTP address (None
if disabled). Read more
sourcefn rpc_ws(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
fn rpc_ws(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
Get the RPC websocket address (None
if disabled). Read more
sourcefn rpc_methods(&self) -> Result<RpcMethods>
fn rpc_methods(&self) -> Result<RpcMethods>
Returns the RPC method set to expose. Read more
sourcefn rpc_ws_max_connections(&self) -> Result<Option<usize>>
fn rpc_ws_max_connections(&self) -> Result<Option<usize>>
Get the RPC websockets maximum connections (None
if unlimited). Read more
sourcefn rpc_cors(&self, _is_dev: bool) -> Result<Option<Vec<String>>>
fn rpc_cors(&self, _is_dev: bool) -> Result<Option<Vec<String>>>
Get the RPC cors (None
if disabled) Read more
sourcefn prometheus_config(
&self,
_default_listen_port: u16
) -> Result<Option<PrometheusConfig>>
fn prometheus_config(
&self,
_default_listen_port: u16
) -> Result<Option<PrometheusConfig>>
Get the prometheus configuration (None
if disabled) Read more
sourcefn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
Get the telemetry endpoints (if any) Read more
sourcefn telemetry_external_transport(&self) -> Result<Option<ExtTransport>>
fn telemetry_external_transport(&self) -> Result<Option<ExtTransport>>
Get the telemetry external transport Read more
sourcefn default_heap_pages(&self) -> Result<Option<u64>>
fn default_heap_pages(&self) -> Result<Option<u64>>
Get the default value for heap pages Read more
sourcefn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
Returns an offchain worker config wrapped in Ok(_)
Read more
Returns Ok(true)
if authoring should be forced Read more
sourcefn disable_grandpa(&self) -> Result<bool>
fn disable_grandpa(&self) -> Result<bool>
Returns Ok(true)
if grandpa should be disabled Read more
sourcefn dev_key_seed(&self, _is_dev: bool) -> Result<Option<String>>
fn dev_key_seed(&self, _is_dev: bool) -> Result<Option<String>>
Get the development key seed from the current object Read more
sourcefn tracing_targets(&self) -> Result<Option<String>>
fn tracing_targets(&self) -> Result<Option<String>>
Get the tracing targets from the current object (if any) Read more
sourcefn tracing_receiver(&self) -> Result<TracingReceiver>
fn tracing_receiver(&self) -> Result<TracingReceiver>
Get the TracingReceiver value from the current object Read more
sourcefn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig>
fn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig>
Get the node key from the current object Read more
sourcefn max_runtime_instances(&self) -> Result<Option<usize>>
fn max_runtime_instances(&self) -> Result<Option<usize>>
Get maximum runtime instances Read more
sourcefn announce_block(&self) -> Result<bool>
fn announce_block(&self) -> Result<bool>
Activate or not the automatic announcing of blocks after import Read more
sourcefn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration>
fn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration>
Create a Configuration object from the current object
sourcefn log_filters(&self) -> Result<String>
fn log_filters(&self) -> Result<String>
Get the filters for the logging. Read more
sourcefn is_log_filter_reloading_disabled(&self) -> Result<bool>
fn is_log_filter_reloading_disabled(&self) -> Result<bool>
Is log reloading disabled (enabled by default)
sourcefn disable_log_color(&self) -> Result<bool>
fn disable_log_color(&self) -> Result<bool>
Should the log color output be disabled?
sourcefn init<C: SubstrateCli>(&self) -> Result<TelemetryWorker>
fn init<C: SubstrateCli>(&self) -> Result<TelemetryWorker>
Initialize substrate. This must be done only once per process. Read more
sourceimpl Debug for CheckBlockCmd
impl Debug for CheckBlockCmd
sourceimpl StructOpt for CheckBlockCmd
impl StructOpt for CheckBlockCmd
sourcefn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic. Read more
sourcefn from_args() -> Self
fn from_args() -> Self
Builds the struct from the command line arguments (std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program. Read more
sourcefn from_args_safe() -> Result<Self, Error>
fn from_args_safe() -> Result<Self, Error>
Builds the struct from the command line arguments (std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you. Read more
sourcefn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making.
Print the error message and quit the program in case of failure. Read more
sourcefn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
Auto Trait Implementations
impl RefUnwindSafe for CheckBlockCmd
impl Send for CheckBlockCmd
impl Sync for CheckBlockCmd
impl Unpin for CheckBlockCmd
impl UnwindSafe for CheckBlockCmd
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
. Read more
sourcefn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcepub fn unique_saturated_into(self) -> T
pub fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more