diff --git a/runtime/src/in_mem_accounts_index.rs b/runtime/src/in_mem_accounts_index.rs index 3c1a14e6a4..2e4462bd1a 100644 --- a/runtime/src/in_mem_accounts_index.rs +++ b/runtime/src/in_mem_accounts_index.rs @@ -83,6 +83,8 @@ impl InMemAccountsIndex { where R: RangeBounds + std::fmt::Debug, { + self.start_stop_flush(true); + self.put_range_in_cache(range); // check range here to see if our items are already held in the cache Self::update_stat(&self.stats().items, 1); let map = self.map().read().unwrap(); let mut result = Vec::with_capacity(map.len()); @@ -91,6 +93,7 @@ impl InMemAccountsIndex { result.push((*k, v.clone())); } }); + self.start_stop_flush(false); result }