Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Comment Subcommand::Base and SubDb
  • Loading branch information
wuminzhe committed Oct 12, 2020
commit bac8bce88b91f55c952c18e37676ecd20f3350de
6 changes: 3 additions & 3 deletions bin/node-template/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub struct Cli {
/// Possible subcommands of the main binary.
#[derive(Debug, StructOpt)]
pub enum Subcommand {
/// A set of base subcommands handled by `sc_cli`.
#[structopt(flatten)]
Base(sc_cli::Subcommand),
// aki: /// A set of base subcommands handled by `sc_cli`.
// #[structopt(flatten)]
// Base(sc_cli::Subcommand),

/// Key management cli utilities
Key(KeySubcommand),
Expand Down
27 changes: 14 additions & 13 deletions bin/node-template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,20 @@ pub fn run() -> sc_cli::Result<()> {
_ => service::node_template_new_full(config).map(|(components, _)| components),
})
}
Some(Subcommand::Base(subcommand)) => {
let runtime = cli.create_runner(subcommand)?;
let chain_spec = &runtime.config().chain_spec;

set_default_ss58_version(chain_spec);

runtime.run_subcommand(subcommand, |config| {
service::new_chain_ops::<
service::node_template_runtime::RuntimeApi,
service::NodeTemplateExecutor,
>(config)
})
}
// aki:
// Some(Subcommand::Base(subcommand)) => {
// let runtime = cli.create_runner(subcommand)?;
// let chain_spec = &runtime.config().chain_spec;
//
// set_default_ss58_version(chain_spec);
//
// runtime.run_subcommand(subcommand, |config| {
// service::new_chain_ops::<
// service::node_template_runtime::RuntimeApi,
// service::NodeTemplateExecutor,
// >(config)
// })
// }
Some(Subcommand::Key(cmd)) => cmd.run(),
Some(Subcommand::Sign(cmd)) => cmd.run(),
Some(Subcommand::Verify(cmd)) => cmd.run(),
Expand Down
4 changes: 2 additions & 2 deletions client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ impl DatabaseConfig {
.unwrap_or(origin_data_base_cache_size.unwrap_or(128)),
}
}
Database::SubDb => sc_service::config::DatabaseConfig::SubDb { path },
// aki: Database::SubDb => sc_service::config::DatabaseConfig::SubDb { path },
Database::ParityDb => sc_service::config::DatabaseConfig::ParityDb { path },
}
} else {
Expand All @@ -689,7 +689,7 @@ enum Database {
// Facebooks RocksDB
RocksDb,
// Subdb. https://github.com/paritytech/subdb/
SubDb,
// aki: SubDb,
// ParityDb. https://github.com/paritytech/parity-db/
ParityDb,
}
Expand Down