Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Replaces get_account_read_entry() in ancient append vecs
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Feb 17, 2024
1 parent 183fdd7 commit 98023c4
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions accounts-db/src/ancient_append_vecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,11 +1506,9 @@ pub mod tests {
if two_refs {
original_results.iter().for_each(|results| {
results.stored_accounts.iter().for_each(|account| {
let entry = db
.accounts_index
.get_account_read_entry(account.pubkey())
.unwrap();
entry.addref();
db.accounts_index.get_and_then(account.pubkey(), |entry| {
(false, entry.unwrap().addref())
});
})
});
}
Expand Down Expand Up @@ -1854,11 +1852,8 @@ pub mod tests {
);
original_results.iter().for_each(|results| {
results.stored_accounts.iter().for_each(|account| {
let entry = db
.accounts_index
.get_account_read_entry(account.pubkey())
.unwrap();
entry.addref();
db.accounts_index
.get_and_then(account.pubkey(), |entry| (true, entry.unwrap().addref()));
})
});

Expand Down

0 comments on commit 98023c4

Please sign in to comment.