Revert "Create bank snapshots (#3671)" (#4243)

This reverts commit abf2b300da.
This commit is contained in:
Rob Walker
2019-05-09 19:27:27 -07:00
committed by GitHub
parent abf2b300da
commit 81fa69d347
26 changed files with 142 additions and 1130 deletions

View File

@@ -1,9 +1,9 @@
use hashbrown::HashMap;
use solana_runtime::bank::Bank;
use solana_sdk::account::Account;
use solana_sdk::pubkey::Pubkey;
use solana_vote_api::vote_state::VoteState;
use std::borrow::Borrow;
use std::collections::HashMap;
/// Looks through vote accounts, and finds the latest slot that has achieved
/// supermajority lockout
@@ -66,7 +66,7 @@ pub fn node_staked_accounts_at_epoch(
) -> Option<impl Iterator<Item = (&Pubkey, u64, &Account)>> {
bank.epoch_vote_accounts(epoch_height).map(|epoch_state| {
epoch_state
.iter()
.into_iter()
.filter_map(|(account_id, account)| {
filter_zero_balances(account).map(|stake| (account_id, stake, account))
})
@@ -152,9 +152,9 @@ pub mod tests {
create_genesis_block, create_genesis_block_with_leader, BOOTSTRAP_LEADER_LAMPORTS,
};
use crate::voting_keypair::tests as voting_keypair_tests;
use hashbrown::HashSet;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use std::collections::HashSet;
use std::iter::FromIterator;
use std::sync::Arc;