pub struct AccountsIndex<T: IndexValue> {
    pub account_maps: Vec<RwLock<AccountMap<T>>>,
    pub bin_calculator: PubkeyBinCalculator24,
    pub removed_bank_ids: Mutex<HashSet<BankId>>,
    pub scan_results_limit_bytes: Option<usize>,
    pub roots_added: AtomicUsize,
    pub roots_removed: AtomicUsize,
    pub active_scans: AtomicUsize,
    pub max_distance_to_min_scan_slot: AtomicU64,
    /* private fields */
}

Fields

account_maps: Vec<RwLock<AccountMap<T>>>bin_calculator: PubkeyBinCalculator24removed_bank_ids: Mutex<HashSet<BankId>>scan_results_limit_bytes: Option<usize>

when a scan’s accumulated data exceeds this limit, abort the scan

roots_added: AtomicUsizeroots_removed: AtomicUsizeactive_scans: AtomicUsizemax_distance_to_min_scan_slot: AtomicU64

Implementations

is the accounts index using disk as a backing store

source

pub fn get_account_read_entry(
    &self,
    pubkey: &Pubkey
) -> Option<ReadAccountMapEntry<T>>

source

pub fn get_account_read_entry_with_lock(
    &self,
    pubkey: &Pubkey,
    lock: &RwLockReadGuard<'_, AccountMap<T>>
) -> Option<ReadAccountMapEntry<T>>

return Vec<Vec<>> because the internal vecs are already allocated per bin

Updates the given pubkey at the given slot with the new account information. on return, the index’s previous account info may be returned in ‘reclaims’ depending on ‘previous_slot_entry_was_cached’

Given a list of slots, return a new list of only the slots that are rooted

return the lowest original root >= slot, including historical_roots and ancestors

roots are inserted into ‘historical_roots’ and ‘roots’ as a new root is made. roots are removed form ‘roots’ as all entries in the append vec become outdated. This function exists to clean older entries from ‘historical_roots’. all roots < ‘oldest_slot_to_keep’ are removed from ‘historical_roots’.

Remove the slot when the storage for the slot is freed Accounts no longer reference this slot. return true if slot was a root

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more