solana
solana copied to clipboard
Replaces ReadAccountMapEntry in read_index_for_accessor_or_load_slow()
Problem
See https://github.com/solana-labs/solana/issues/34786 for background.
We want to limit the use of ReadAccountMapEntry
, from AccountsIndex, everywhere. Ultimately removing it once there are no more uses.
When reading the index for an account accessor, we currently use ReadAccountMapEntry
via AccountsIndex::get()
. But we can do it other ways without ReadAccountMapEntry
.
Summary of Changes
Adds get_with_and_then()
and uses it in read_index_for_accessor_or_load_slow()
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
4b65cc8
) 81.6% compared to head (f57b729
) 81.6%. Report is 6 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #35220 +/- ##
=========================================
- Coverage 81.6% 81.6% -0.1%
=========================================
Files 833 833
Lines 224765 224776 +11
=========================================
- Hits 183480 183476 -4
- Misses 41285 41300 +15
I rebased and force-pushed this branch to pull in #35307.