Co #11456: Match statement fallthrough for benchmark commands (#1350)

* Add default error for unsupported benchmarking command

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Same for the parachain-template...

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* cargo update -p polkadot-primitives

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-07-19 14:53:59 +02:00
committed by GitHub
parent 6bd0feeb42
commit f1b02db6e2
3 changed files with 260 additions and 254 deletions
+4 -1
View File
@@ -227,9 +227,12 @@ pub fn run() -> Result<()> {
cmd.run(config, partials.client.clone(), db, storage)
}),
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
BenchmarkCmd::Machine(cmd) =>
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())),
// NOTE: this allows the Client to leniently implement
// new benchmark commands without requiring a companion MR.
#[allow(unreachable_patterns)]
_ => Err("Benchmarking sub-command unsupported".into()),
}
},
Some(Subcommand::TryRuntime(cmd)) => {