mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 19:29:56 +00:00
rustfmt staking-miner and fix typos
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
@@ -6,7 +6,7 @@ use sp_npos_elections::BalancingConfig;
|
||||
use sp_runtime::DeserializeOwned;
|
||||
|
||||
use std::{collections::HashMap, fmt, str::FromStr};
|
||||
use subxt::backend::legacy::rpc_methods:: as subxt_rpc;
|
||||
use subxt::backend::legacy::rpc_methods as subxt_rpc;
|
||||
|
||||
#[derive(Debug, Clone, Parser)]
|
||||
#[cfg_attr(test, derive(PartialEq))]
|
||||
@@ -18,7 +18,7 @@ pub enum Solver {
|
||||
PhragMMS {
|
||||
#[clap(long, default_value = "10")]
|
||||
iterations: usize,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
frame_support::parameter_types! {
|
||||
@@ -30,7 +30,7 @@ frame_support::parameter_types! {
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub enum Chain {
|
||||
Ghost,
|
||||
Casper
|
||||
Casper,
|
||||
}
|
||||
|
||||
impl fmt::Display for Chain {
|
||||
@@ -64,8 +64,8 @@ impl TryFrom<subxt_rpc::RuntimeVersion> for Chain {
|
||||
.get("specName")
|
||||
.expect("RuntimeVersion must have specName; qed")
|
||||
.clone();
|
||||
let mut chain = serde_json::from_value::<String>(json)
|
||||
.expect("specName must be String; qed");
|
||||
let mut chain =
|
||||
serde_json::from_value::<String>(json).expect("specName must be String; qed");
|
||||
chain.make_ascii_lowercase();
|
||||
Chain::from_str(&chain)
|
||||
}
|
||||
@@ -96,8 +96,7 @@ impl From<subxt_rpc::RuntimeVersion> for RuntimeVersion {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
|
||||
#[derive(Debug)]
|
||||
#[derive(Deserialize, Serialize, PartialEq, Debug, Clone, Debug)]
|
||||
pub struct RuntimeVersion {
|
||||
pub spec_name: String,
|
||||
pub impl_name: String,
|
||||
|
||||
Reference in New Issue
Block a user