Skip to content
This repository was archived by the owner on Jan 23, 2022. It is now read-only.
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use substrate_phragmen::{
};
use sr_primitives::traits::Convert;
use support::storage::generator::Linkage;
use staking::{StakingLedger, ValidatorPrefs};
use staking::{StakingLedger, ValidatorPrefs, Nominations};

// TODO: clean function interfaces: probably no more passing string.
// TODO: allow it to read data from remote node (there's an issue with JSON-PRC client).
Expand Down Expand Up @@ -279,14 +279,14 @@ fn main() {
).into_iter().map(|(v, _p)| v).collect::<Vec<AccountId>>();

// stash key of current nominators
let nominators = storage::enumerate_linked_map::<
let nominators: Vec<(AccountId, Vec<AccountId>)> = storage::enumerate_linked_map::<
AccountId,
Vec<AccountId>,
Nominations<AccountId>,
>(
"Staking".to_string(),
"Nominators".to_string(),
&client,
);
).into_iter().map(|(v, p)| (v, p.targets)).collect();

// get the slashable balance of every entity
let mut staker_infos: BTreeMap<AccountId, Staker> = BTreeMap::new();
Expand Down