Companion to combine iteratons and tolerance in sp-npos-elections API #11498 (#5581)

* Fixing staking miner

* cargo update -p sp-io

* fix spell

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Georges
2022-06-16 01:57:26 +01:00
committed by GitHub
parent 77f4cab60c
commit 2ba1c54fc7
3 changed files with 174 additions and 174 deletions
+171 -171
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -600,7 +600,7 @@ struct ImportUndo {
/// The direction of the vote, for block validity (`true`) or invalidity (`false`).
valid: bool,
/// Has the validator participated before, i.e. in backing or
/// with an oposing vote.
/// with an opposing vote.
new_participant: bool,
}
+2 -2
View File
@@ -46,7 +46,7 @@ use frame_support::traits::Get;
use jsonrpsee::ws_client::{WsClient, WsClientBuilder};
use remote_externalities::{Builder, Mode, OnlineConfig};
use rpc::{RpcApiClient, SharedRpcClient};
use sp_npos_elections::ExtendedBalance;
use sp_npos_elections::BalancingConfig;
use sp_runtime::{traits::Block as BlockT, DeserializeOwned, Perbill};
use tracing_subscriber::{fmt, EnvFilter};
@@ -346,7 +346,7 @@ frame_support::parameter_types! {
/// Number of balancing iterations for a solution algorithm. Set based on the [`Solvers`] CLI
/// config.
pub static BalanceIterations: usize = 10;
pub static Balancing: Option<(usize, ExtendedBalance)> = Some((BalanceIterations::get(), 0));
pub static Balancing: Option<BalancingConfig> = Some( BalancingConfig { iterations: BalanceIterations::get(), tolerance: 0 } );
}
#[derive(Debug, Clone, Parser)]