Adds export-state subcommand (#5842)

* Export state cli

* More work

* Fix tests

* Make it work

* Fix compilation

* Apply suggestions from code review
This commit is contained in:
Bastian Köcher
2020-04-30 15:44:40 +02:00
committed by GitHub
parent 929bd07bef
commit 5b8d3607e9
12 changed files with 329 additions and 86 deletions
+7
View File
@@ -119,6 +119,7 @@ use serde::{Serialize, de::DeserializeOwned};
use sp_runtime::BuildStorage;
use sc_network::config::MultiaddrWithPeerId;
use sc_telemetry::TelemetryEndpoints;
use sp_core::storage::Storage;
/// A set of traits for the runtime genesis config.
pub trait RuntimeGenesis: Serialize + DeserializeOwned + BuildStorage {}
@@ -150,4 +151,10 @@ pub trait ChainSpec: BuildStorage + Send {
fn as_json(&self, raw: bool) -> Result<String, String>;
/// Return StorageBuilder for this spec.
fn as_storage_builder(&self) -> &dyn BuildStorage;
/// Returns a cloned `Box<dyn ChainSpec>`.
fn cloned_box(&self) -> Box<dyn ChainSpec>;
/// Set the storage that should be used by this chain spec.
///
/// This will be used as storage at genesis.
fn set_storage(&mut self, storage: Storage);
}