mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Take genesis_storage by ref (#4617)
Instead of having these weird implementation of `BuildStorage for &ChainSpec` we should just take the `genesis_storage` by ref. The `BuildStorage` trait changed some time ago to take a self ref anyway, instead of a self value. Also fixes warnings in frame-staking
This commit is contained in:
@@ -283,7 +283,7 @@ use sp_staking::{
|
||||
use sp_runtime::{Serialize, Deserialize};
|
||||
use frame_system::{self as system, ensure_signed, ensure_root};
|
||||
|
||||
use sp_phragmen::{ExtendedBalance, PhragmenStakedAssignment};
|
||||
use sp_phragmen::ExtendedBalance;
|
||||
|
||||
const DEFAULT_MINIMUM_VALIDATOR_COUNT: u32 = 4;
|
||||
const MAX_NOMINATIONS: usize = 16;
|
||||
@@ -1508,12 +1508,10 @@ impl<T: Trait> Module<T> {
|
||||
.collect::<Vec<T::AccountId>>();
|
||||
let assignments = phragmen_result.assignments;
|
||||
|
||||
let to_votes = |b: BalanceOf<T>|
|
||||
<T::CurrencyToVote as Convert<BalanceOf<T>, u64>>::convert(b) as ExtendedBalance;
|
||||
let to_balance = |e: ExtendedBalance|
|
||||
<T::CurrencyToVote as Convert<ExtendedBalance, BalanceOf<T>>>::convert(e);
|
||||
|
||||
let mut supports = sp_phragmen::build_support_map::<_, _, _, T::CurrencyToVote>(
|
||||
let supports = sp_phragmen::build_support_map::<_, _, _, T::CurrencyToVote>(
|
||||
&elected_stashes,
|
||||
&assignments,
|
||||
Self::slashable_balance_of,
|
||||
|
||||
Reference in New Issue
Block a user