Skip to content

Commit

Permalink
style: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwht committed Aug 28, 2024
1 parent ffcfcae commit a0544ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
20 changes: 8 additions & 12 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@ impl RuntimeResolver for PathBuf {

fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
Ok(match id {
"dev" | "devnet" | "dev-paseo" => {
Box::new(chain_spec::development_config(Relay::PaseoLocal))
},
"dev" | "devnet" | "dev-paseo" =>
Box::new(chain_spec::development_config(Relay::PaseoLocal)),
"test" | "testnet" | "pop-paseo" => Box::new(chain_spec::testnet_config(Relay::Paseo)),
"pop-network" | "pop" | "pop-polkadot" | "mainnet" => {
Box::new(chain_spec::mainnet_config(Relay::Polkadot))
},
"pop-network" | "pop" | "pop-polkadot" | "mainnet" =>
Box::new(chain_spec::mainnet_config(Relay::Polkadot)),
"" | "local" => Box::new(chain_spec::development_config(Relay::PaseoLocal)),
path => {
let path: PathBuf = path.into();
Expand Down Expand Up @@ -285,7 +283,7 @@ pub fn run() -> Result<()> {
let runner = cli.create_runner(cmd)?;
// Switch on the concrete benchmark sub-command-
match cmd {
BenchmarkCmd::Pallet(cmd) => {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| {
cmd.run_with_spec::<HashingFor<Block>, ReclaimHostFunctions>(Some(
Expand All @@ -296,8 +294,7 @@ pub fn run() -> Result<()> {
Err("Benchmarking wasn't enabled when building the node. You can enable \
it with `--features runtime-benchmarks`."
.into())
}
},
},
BenchmarkCmd::Block(cmd) => runner.sync_run(|config| {
construct_benchmark_partials!(config, |partials| cmd.run(partials.client))
}),
Expand All @@ -314,9 +311,8 @@ pub fn run() -> Result<()> {
cmd.run(config, partials.client.clone(), db, storage)
})
}),
BenchmarkCmd::Machine(cmd) => {
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()))
},
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)]
Expand Down
8 changes: 4 additions & 4 deletions runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ impl Contains<RuntimeCall> for FilteredCalls {
matches!(
c,
RuntimeCall::Balances(
force_adjust_total_issuance { .. }
| force_set_balance { .. }
| force_transfer { .. }
| force_unreserve { .. }
force_adjust_total_issuance { .. } |
force_set_balance { .. } |
force_transfer { .. } |
force_unreserve { .. }
)
)
}
Expand Down

0 comments on commit a0544ce

Please sign in to comment.