rustfmt staking-miner and fix typos

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch
2025-07-29 14:38:49 +03:00
parent e21ac88235
commit ce26787a11
14 changed files with 1317 additions and 130 deletions

View File

@@ -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,