Struct sc_cli::commands::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§
source§impl 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> + HeaderBackend<B> + Send + Sync + 'static,
IQ: ImportQueue<B> + 'static,
<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> + HeaderBackend<B> + Send + Sync + 'static, IQ: ImportQueue<B> + 'static, <B::Hash as FromStr>::Err: Debug, <<B::Header as HeaderT>::Number as FromStr>::Err: Debug,
Run the check-block command
Trait Implementations§
source§impl Args for CheckBlockCmd
impl Args for CheckBlockCmd
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id
][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl CliConfiguration<()> for CheckBlockCmd
impl CliConfiguration<()> for CheckBlockCmd
Get the SharedParams for this object
source§fn import_params(&self) -> Option<&ImportParams>
fn import_params(&self) -> Option<&ImportParams>
Get the ImportParams for this object
source§fn pruning_params(&self) -> Option<&PruningParams>
fn pruning_params(&self) -> Option<&PruningParams>
Get the PruningParams for this object
source§fn keystore_params(&self) -> Option<&KeystoreParams>
fn keystore_params(&self) -> Option<&KeystoreParams>
Get the KeystoreParams for this object
source§fn network_params(&self) -> Option<&NetworkParams>
fn network_params(&self) -> Option<&NetworkParams>
Get the NetworkParams for this object
source§fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
Get a reference to
OffchainWorkerParams
for this object.source§fn node_key_params(&self) -> Option<&NodeKeyParams>
fn node_key_params(&self) -> Option<&NodeKeyParams>
Get the NodeKeyParams for this object
source§fn database_params(&self) -> Option<&DatabaseParams>
fn database_params(&self) -> Option<&DatabaseParams>
Get the DatabaseParams for this object
source§fn base_path(&self) -> Result<Option<BasePath>>
fn base_path(&self) -> Result<Option<BasePath>>
Get the base path of the configuration (if any) Read more
source§fn transaction_pool(&self, _is_dev: bool) -> Result<TransactionPoolOptions>
fn transaction_pool(&self, _is_dev: bool) -> Result<TransactionPoolOptions>
Get the transaction pool options Read more
source§fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
is_validator: 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, is_validator: 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
source§fn keystore_config(&self, config_dir: &PathBuf) -> Result<KeystoreConfig>
fn keystore_config(&self, config_dir: &PathBuf) -> Result<KeystoreConfig>
Get the keystore configuration. Read more
source§fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseSource>
fn database_config( &self, base_path: &PathBuf, cache_size: usize, database: Database ) -> Result<DatabaseSource>
Get the database configuration object for the parameters provided
source§fn trie_cache_maximum_size(&self) -> Result<Option<usize>>
fn trie_cache_maximum_size(&self) -> Result<Option<usize>>
Get the trie cache maximum size. Read more
source§fn state_pruning(&self) -> Result<Option<PruningMode>>
fn state_pruning(&self) -> Result<Option<PruningMode>>
Get the state pruning mode. Read more
source§fn blocks_pruning(&self) -> Result<BlocksPruning>
fn blocks_pruning(&self) -> Result<BlocksPruning>
Get the block pruning mode. Read more
source§fn wasm_method(&self) -> Result<WasmExecutionMethod>
fn wasm_method(&self) -> Result<WasmExecutionMethod>
Get the WASM execution method. Read more
source§fn wasm_runtime_overrides(&self) -> Option<PathBuf>
fn wasm_runtime_overrides(&self) -> Option<PathBuf>
Get the path where WASM overrides live. Read more
source§fn rpc_addr(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
fn rpc_addr(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
Get the RPC address.
source§fn rpc_methods(&self) -> Result<RpcMethods>
fn rpc_methods(&self) -> Result<RpcMethods>
Returns the RPC method set to expose. Read more
source§fn rpc_max_connections(&self) -> Result<u32>
fn rpc_max_connections(&self) -> Result<u32>
Get the maximum number of RPC server connections.
source§fn 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 moresource§fn rpc_max_request_size(&self) -> Result<u32>
fn rpc_max_request_size(&self) -> Result<u32>
Get maximum RPC request payload size.
source§fn rpc_max_response_size(&self) -> Result<u32>
fn rpc_max_response_size(&self) -> Result<u32>
Get maximum RPC response payload size.
source§fn rpc_max_subscriptions_per_connection(&self) -> Result<u32>
fn rpc_max_subscriptions_per_connection(&self) -> Result<u32>
Get maximum number of subscriptions per connection.
source§fn prometheus_config(
&self,
_default_listen_port: u16,
_chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<PrometheusConfig>>
fn prometheus_config( &self, _default_listen_port: u16, _chain_spec: &Box<dyn ChainSpec> ) -> Result<Option<PrometheusConfig>>
Get the prometheus configuration (
None
if disabled) Read moresource§fn 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
source§fn default_heap_pages(&self) -> Result<Option<u64>>
fn default_heap_pages(&self) -> Result<Option<u64>>
Get the default value for heap pages Read more
source§fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
Returns an offchain worker config wrapped in
Ok(_)
Read moreReturns
Ok(true)
if authoring should be forced Read moresource§fn disable_grandpa(&self) -> Result<bool>
fn disable_grandpa(&self) -> Result<bool>
Returns
Ok(true)
if grandpa should be disabled Read moresource§fn 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
source§fn 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
source§fn tracing_receiver(&self) -> Result<TracingReceiver>
fn tracing_receiver(&self) -> Result<TracingReceiver>
Get the TracingReceiver value from the current object Read more
source§fn 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
source§fn max_runtime_instances(&self) -> Result<Option<usize>>
fn max_runtime_instances(&self) -> Result<Option<usize>>
Get maximum runtime instances Read more
source§fn announce_block(&self) -> Result<bool>
fn announce_block(&self) -> Result<bool>
Activate or not the automatic announcing of blocks after import Read more
source§fn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
tokio_handle: Handle
) -> Result<Configuration>
fn create_configuration<C: SubstrateCli>( &self, cli: &C, tokio_handle: Handle ) -> Result<Configuration>
Create a Configuration object from the current object
source§fn detailed_log_output(&self) -> Result<bool>
fn detailed_log_output(&self) -> Result<bool>
Should the detailed log output be enabled.
source§fn enable_log_reloading(&self) -> Result<bool>
fn enable_log_reloading(&self) -> Result<bool>
Is log reloading enabled?
source§fn disable_log_color(&self) -> Result<bool>
fn disable_log_color(&self) -> Result<bool>
Should the log color output be disabled?
source§fn init<F>(
&self,
support_url: &String,
impl_version: &String,
logger_hook: F,
config: &Configuration
) -> Result<()>where
F: FnOnce(&mut LoggerBuilder, &Configuration),
fn init<F>( &self, support_url: &String, impl_version: &String, logger_hook: F, config: &Configuration ) -> Result<()>where F: FnOnce(&mut LoggerBuilder, &Configuration),
Initialize substrate. This must be done only once per process. Read more
source§impl Clone for CheckBlockCmd
impl Clone for CheckBlockCmd
source§fn clone(&self) -> CheckBlockCmd
fn clone(&self) -> CheckBlockCmd
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CommandFactory for CheckBlockCmd
impl CommandFactory for CheckBlockCmd
source§impl Debug for CheckBlockCmd
impl Debug for CheckBlockCmd
source§impl FromArgMatches for CheckBlockCmd
impl FromArgMatches for CheckBlockCmd
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>
Assign values from
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>
Assign values from
ArgMatches
to self
.source§impl Parser for CheckBlockCmd
impl Parser for CheckBlockCmd
§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
Parse from
std::env::args_os()
, return Err on error.§fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Selfwhere I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Parse from iterator, exit on error
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Parse from iterator, return Err on error.
§fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I)where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Update from iterator, exit on error
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Update from iterator, return Err on error.
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§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
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, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§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>,
Consume self to return an equivalent value of
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
The counterpart to
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.