Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP
  • Loading branch information
cecton committed Jan 16, 2020
commit 66be58865f84e0b80b0bdc2c64f3f3b16a88ee4f
42 changes: 39 additions & 3 deletions client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> {
pub fn into_configuration<C, G, E, S>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should existing node/cli and node-template/cli be using that function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(answered on #4643 (comment) )

self,
spec_factory: S,
) -> error::Result<Configuration<C, G, E>>
) -> Option<error::Result<Configuration<C, G, E>>>
where
C: Default,
G: RuntimeGenesis,
Expand All @@ -309,8 +309,44 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> {
{
match self {
ParseAndPrepare::Run(c) =>
create_run_node_config(c.params.left, spec_factory, c.impl_name, c.version),
_ => todo!(),
Some(create_run_node_config(
c.params.left,
spec_factory,
c.impl_name,
c.version
)),
ParseAndPrepare::BuildSpec(_) => None,
ParseAndPrepare::ExportBlocks(c) =>
Some(create_config_with_db_path(
spec_factory,
&c.params.shared_params,
c.version,
)),
ParseAndPrepare::ImportBlocks(c) =>
Some(create_config_with_db_path(
spec_factory,
&c.params.shared_params,
c.version,
)),
ParseAndPrepare::CheckBlock(c) =>
Some(create_config_with_db_path(
spec_factory,
&c.params.shared_params,
c.version,
)),
ParseAndPrepare::PurgeChain(c) =>
Some(create_config_with_db_path(
spec_factory,
&c.params.shared_params,
c.version
)),
ParseAndPrepare::RevertChain(c) =>
Some(create_config_with_db_path(
spec_factory,
&c.params.shared_params,
c.version,
)),
ParseAndPrepare::CustomCommand(_) => None,
}
}
}
Expand Down