Snapshot optimizations (#5518)
* Limit slots_since_snapshot size, only package latest snapshot, refactor tests * Add test checking status_cache.roots == bank_forks.slots_since_snapshot after bank_forks.set_root()
This commit is contained in:
@@ -124,6 +124,10 @@ impl<T: Serialize + Clone> StatusCache<T> {
|
||||
self.purge_roots();
|
||||
}
|
||||
|
||||
pub fn roots(&self) -> &HashSet<u64> {
|
||||
&self.roots
|
||||
}
|
||||
|
||||
/// Insert a new signature for a specific slot.
|
||||
pub fn insert(&mut self, transaction_blockhash: &Hash, sig: &Signature, slot: Slot, res: T) {
|
||||
let sig_index: usize;
|
||||
|
Reference in New Issue
Block a user