fix: export-genesis-state command#1521
Conversation
6aab563 to
5fe48c4
Compare
| Some(Subcommand::ExportGenesisState(cmd)) => { | ||
| let runner = cli.create_runner(cmd)?; | ||
| runner.sync_run(|config| { | ||
| construct_benchmark_partials!(config, |partials| cmd.run(&*config.chain_spec, &*partials.client)) |
There was a problem hiding this comment.
The macro should then be renamed.
There was a problem hiding this comment.
What about simply construct_partials?
If not, any suggestion?
On a side note: I've seen construct_benchmark_partials in several parachains and templates. If we are now to change the name (and I definitely agree with that, since I found it misleading in all cases I saw) we should take into account it will tend to be imitated elsewhere.
There was a problem hiding this comment.
What about simply
construct_partials?
Sounds good.
we should take into account it will tend to be imitated elsewhere.
People copying our code/name is not really something that we should take into account here. This isn't any public interface.
There was a problem hiding this comment.
Sounds good.
Done in commit 3a10545.
People copying our code/name is not really something that we should take into account here. This isn't any public interface.
Understood. Thanks for clarifying.
Description
Currently the
ExportGenesisStatecommand in polkadot parachain uses an asynchronous context to run, which seems to display some warnings. See the screenshot below:After the changes in this PR, which essentially runs the command in a synchronous context, the command works properly without any warning.
The remaining runtimes were added to
construct_benchmark_partialsmacro in order not to fail if the runtime was not included in the non-exhaustive initial list, similarly to theconstruct_async_runone.For completeness: tests were made following this tutorial.