-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The macro should then be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ExportGenesisState
command 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_partials
macro in order not to fail if the runtime was not included in the non-exhaustive initial list, similarly to theconstruct_async_run
one.For completeness: tests were made following this tutorial.