Fix export genesis command (#395)

This commit is contained in:
Bastian Köcher
2021-04-11 10:34:31 +02:00
committed by GitHub
parent 50037a82e8
commit dfdee4cb52
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -60,8 +60,10 @@ pub struct ExportGenesisStateCommand {
pub output: Option<PathBuf>,
/// Id of the parachain this state is for.
#[structopt(long, default_value = "100", conflicts_with = "chain")]
pub parachain_id: u32,
///
/// Default: 100
#[structopt(long, conflicts_with = "chain")]
pub parachain_id: Option<u32>,
/// Write output in binary. Default is to write in hex.
#[structopt(short, long)]
+1 -1
View File
@@ -241,7 +241,7 @@ pub fn run() -> Result<()> {
let block: Block = generate_genesis_block(&load_spec(
&params.chain.clone().unwrap_or_default(),
params.parachain_id.into(),
params.parachain_id.unwrap_or(100).into(),
)?)?;
let raw_header = block.header().encode();
let output_buf = if params.raw {