Deserialize snapshots (#5417)

* Deserialize snapshots
This commit is contained in:
carllin
2019-08-05 22:53:19 -07:00
committed by GitHub
parent 06d8c06119
commit 1dbb5c8647
14 changed files with 433 additions and 266 deletions

View File

@@ -1,4 +1,3 @@
use log::*;
use solana_sdk::pubkey::Pubkey;
use std::collections::{HashMap, HashSet};
use std::sync::{RwLock, RwLockReadGuard};
@@ -37,7 +36,6 @@ impl<T: Clone> AccountsIndex<T> {
let mut rv = None;
for (i, (fork, _t)) in list.iter().rev().enumerate() {
if *fork >= max && (ancestors.get(fork).is_some() || self.is_root(*fork)) {
trace!("GET {} {:?} i: {}", fork, ancestors, i);
rv = Some((list.len() - 1) - i);
max = *fork;
}