mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-12 21:35:48 +00:00
Remove ServiceBuilderCommand and implement the chain ops as standalone functions instead. (#6543)
* :) * Slight tidy * Remove ServiceBuilderCommand * Remove whitespace * Keep task manager alive for check_block/import_blocks * Pass task_manager to run_until_exit * Make task_manager in run_until_exit and make subcommands async * Change the async_run fn to return a future and task manager * async_run should take a result fn * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Fix spaces in export_raw_state Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
use crate::error;
|
||||
use crate::params::{DatabaseParams, SharedParams};
|
||||
use crate::CliConfiguration;
|
||||
use sc_service::Configuration;
|
||||
use sc_service::DatabaseConfig;
|
||||
use std::fmt::Debug;
|
||||
use std::fs;
|
||||
use std::io::{self, Write};
|
||||
@@ -43,8 +43,8 @@ pub struct PurgeChainCmd {
|
||||
|
||||
impl PurgeChainCmd {
|
||||
/// Run the purge command
|
||||
pub fn run(&self, config: Configuration) -> error::Result<()> {
|
||||
let db_path = config.database.path()
|
||||
pub fn run(&self, database_config: DatabaseConfig) -> error::Result<()> {
|
||||
let db_path = database_config.path()
|
||||
.ok_or_else(||
|
||||
error::Error::Input("Cannot purge custom database implementation".into())
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user