add debugging to test (#19563)

* add debugging to test

* update cargo
This commit is contained in:
Jeff Washington (jwash)
2021-09-01 21:52:16 -05:00
committed by GitHub
parent 622a6fba7f
commit 7eb793a55e
3 changed files with 10 additions and 6 deletions

View File

@ -12181,10 +12181,8 @@ pub mod tests {
assert!(db.storage.get_slot_storage_entries(*slot).is_none());
assert!(db.accounts_cache.slot_cache(*slot).is_none());
let account_in_slot = slot_to_pubkey_map[slot];
assert!(db
.accounts_index
.get_account_read_entry(&account_in_slot)
.is_none());
let item = db.accounts_index.get_account_read_entry(&account_in_slot);
assert!(item.is_none(), "item: {:?}", item);
}
// Wait for flush to finish before starting next trial

View File

@ -133,6 +133,12 @@ pub struct ReadAccountMapEntry<T: IsCached> {
slot_list_guard: RwLockReadGuard<'this, SlotList<T>>,
}
impl<T: IsCached> Debug for ReadAccountMapEntry<T> {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{:?}", self.borrow_owned_entry())
}
}
impl<T: IsCached> ReadAccountMapEntry<T> {
pub fn from_account_map_entry(account_map_entry: AccountMapEntry<T>) -> Self {
ReadAccountMapEntryBuilder {