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 565e7a0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 30 deletions.
28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,44 @@ inherits = "release"
lto = true

[workspace.package]
authors = ["R0GUE <go@r0gue.io>"]
authors = [ "R0GUE <go@r0gue.io>" ]
description = "Pop Network makes it easy for smart contract developers to use the Power of Polkadot."
edition = "2021"
homepage = "https://r0gue.io"
license = "Unlicense"
repository = "https://github.com/r0gue-io/pop-node/"

[workspace]
exclude = ["pop-api", "tests/contracts"]
exclude = [ "pop-api", "tests/contracts" ]
members = [
"integration-tests",
"node",
"primitives",
"runtime/devnet",
"runtime/mainnet",
"runtime/testnet",
"integration-tests",
"node",
"primitives",
"runtime/devnet",
"runtime/mainnet",
"runtime/testnet",
]

resolver = "2"

[workspace.dependencies]
clap = { version = "4.4.18", features = ["derive"] }
clap = { version = "4.4.18", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = [
"derive",
"derive",
] }
futures = "0.3.28"
hex-literal = "0.4.1"
jsonrpsee = { version = "0.23.2", features = ["server"] }
jsonrpsee = { version = "0.23.2", features = [ "server" ] }
log = { version = "0.4.21", default-features = false }
scale-info = { version = "2.11.1", default-features = false, features = [
"derive",
"derive",
] }
serde = "1.0.197"
serde_json = "1.0.114"
smallvec = "1.11.2"
subxt = "0.34.0"
subxt-signer = "0.34.0"
tokio = { version = "1.36", features = ["macros", "rt-multi-thread", "time"] }
tokio = { version = "1.36", features = [ "macros", "rt-multi-thread", "time" ] }
tracing-subscriber = { version = "0.3", default-features = false }

# Build
Expand All @@ -53,7 +53,7 @@ substrate-wasm-builder = "23.0.0"

# Local
pop-primitives = { path = "./primitives", default-features = false }
pop-runtime = { path = "runtime/mainnet", default-features = true } # default-features=true required for `-p pop-node` builds
pop-runtime = { path = "runtime/mainnet", default-features = true } # default-features=true required for `-p pop-node` builds
pop-runtime-common = { path = "runtime/common", default-features = false }
pop-runtime-devnet = { path = "runtime/devnet", default-features = true } # default-features=true required for `-p pop-node` builds
pop-runtime-testnet = { path = "runtime/testnet", default-features = true } # default-features=true required for `-p pop-node` builds
Expand Down
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 565e7a0

Please sign in to comment.