Revert "Fix roots never being purged (#4134)" (#4628)

automerge
This commit is contained in:
Sagar Dhawan 2019-06-10 14:08:09 -07:00 committed by Grimes
parent a2a7c86c0d
commit 9e14cde461
1 changed files with 1 additions and 3 deletions

View File

@ -70,7 +70,7 @@ impl<T: Clone> AccountsIndex<T> {
}
pub fn is_purged(&self, fork: Fork) -> bool {
fork < self.last_root
!self.is_root(fork) && fork < self.last_root
}
pub fn is_root(&self, fork: Fork) -> bool {
self.roots.contains(&fork)
@ -162,8 +162,6 @@ mod tests {
assert!(!index.is_purged(0));
index.add_root(1);
assert!(index.is_purged(0));
index.add_root(2);
assert!(index.is_purged(1));
}
#[test]