Companion for Substrate#14511 (#2821)

* Companion for Substrate#14511

https://github.com/paritytech/substrate/pull/14511

* update lockfile for {"substrate", "polkadot"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Bastian Köcherandparity-processbot authored and GitHub committed 2023-07-05 08:39:48 +00:00
1 parent 8dae85f5f8
commit fdd2e5221e
11 files changed
+314 -390

No files matched your search

+8 -2
View File
@@ -27,6 +27,7 @@ use std::{
use codec::Encode;
use sc_chain_spec::ChainSpec;
use sc_client_api::ExecutorProvider;
use sc_service::{
config::{PrometheusConfig, TelemetryEndpoints},
BasePath, TransactionPoolOptions,
@@ -149,9 +150,14 @@ impl ExportGenesisStateCommand {
pub fn run<Block: BlockT>(
&self,
chain_spec: &dyn ChainSpec,
genesis_state_version: StateVersion,
client: &impl ExecutorProvider<Block>,
) -> sc_cli::Result<()> {
let block: Block = generate_genesis_block(chain_spec, genesis_state_version)?;
let state_version = sc_chain_spec::resolve_state_version_from_wasm(
&chain_spec.build_storage()?,
client.executor(),
)?;
let block: Block = generate_genesis_block(chain_spec, state_version)?;
let raw_header = block.header().encode();
let output_buf = if self.raw {
raw_header