mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
Add chain-info Subcommand (#11250)
* Add `blockchain-info` Subcommand * Update comment * Cleanup * Cleanup * Use `sync_run` * Use `sc_client_db` utility fns instead service backend * Use service `Backend` builder * Impl `From<sp_blockchain::Info>` * Rename to `chain-info` * fmt * Copyright year Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Expose `DatabaseParams` Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -94,4 +94,7 @@ pub enum Subcommand {
|
||||
|
||||
/// Revert the chain to a previous state.
|
||||
Revert(sc_cli::RevertCmd),
|
||||
|
||||
/// Db meta columns information.
|
||||
ChainInfo(sc_cli::ChainInfoCmd),
|
||||
}
|
||||
|
||||
@@ -206,5 +206,9 @@ pub fn run() -> Result<()> {
|
||||
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
|
||||
You can enable it with `--features try-runtime`."
|
||||
.into()),
|
||||
Some(Subcommand::ChainInfo(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
runner.sync_run(|config| cmd.run::<Block>(&config))
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user