Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
chevdor committed Jun 21, 2022
commit acfe01434ba93acacb4e0a5f22edbbbcbc1e88a4
3 changes: 1 addition & 2 deletions utils/staking-miner/src/dry_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

//! The dry-run command.

use crate::{prelude::*, rpc::*, signer::Signer, Error, SharedRpcClient};
use crate::{opts::DryRunConfig, prelude::*, rpc::*, signer::Signer, Error, SharedRpcClient};
use codec::Encode;
use frame_support::traits::Currency;
use sp_core::Bytes;
use sp_npos_elections::ElectionScore;
use crate::opts::DryRunConfig;

/// Forcefully create the snapshot. This can be used to compute the election at anytime.
fn force_create_snapshot<T: EPM::Config>(ext: &mut Ext) -> Result<(), Error<T>> {
Expand Down
4 changes: 2 additions & 2 deletions utils/staking-miner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ fn mine_dpos<T: EPM::Config>(ext: &mut Ext) -> Result<(), Error<T>> {
voters.into_iter().for_each(|(who, stake, targets)| {
if targets.is_empty() {
println!("target = {:?}", (who, stake, targets));
return;
return
}
let share: u128 = (stake as u128) / (targets.len() as u128);
for target in targets {
Expand Down Expand Up @@ -496,7 +496,7 @@ async fn main() {
},
_ => {
eprintln!("unexpected chain: {:?}", chain);
return;
return
},
}
log::info!(target: LOG_TARGET, "connected to chain {:?}", chain);
Expand Down
2 changes: 1 addition & 1 deletion utils/staking-miner/src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl FromStr for SubmissionStrategy {
let percent: u32 = s[15..].parse().map_err(|e| format!("{:?}", e))?;
Self::ClaimBetterThan(Perbill::from_percent(percent))
} else {
return Err(s.into());
return Err(s.into())
};
Ok(res)
}
Expand Down