[][src]Struct solana_runtime::accounts_db::AccountsDB

pub struct AccountsDB {
    pub accounts_index: RwLock<AccountsIndex<AccountInfo>>,
    pub storage: RwLock<AccountStorage>,
    // some fields omitted
}

Fields

accounts_index: RwLock<AccountsIndex<AccountInfo>>

Keeps tracks of index into AppendVec on a per fork basis

storage: RwLock<AccountStorage>

Account storage

Methods

impl AccountsDB[src]

pub fn new_with_file_size(paths: &str, file_size: u64) -> Self[src]

pub fn new(paths: &str) -> Self[src]

pub fn has_accounts(&self, fork: u64) -> bool[src]

pub fn scan_account_storage<F, B>(&self, fork_id: u64, scan_func: F) -> Vec<B> where
    F: Fn(&StoredAccount, &mut B),
    F: Send + Sync,
    B: Send + Default
[src]

Scan a specific fork through all the account storage in parallel with sequential read

pub fn load(
    storage: &AccountStorage,
    ancestors: &HashMap<u64, usize>,
    accounts_index: &AccountsIndex<AccountInfo>,
    pubkey: &Pubkey
) -> Option<(Account, u64)>
[src]

pub fn load_slow(
    &self,
    ancestors: &HashMap<u64, usize>,
    pubkey: &Pubkey
) -> Option<(Account, u64)>
[src]

pub fn purge_fork(&self, fork: u64)[src]

pub fn store(&self, fork_id: u64, accounts: &[(&Pubkey, &Account)])[src]

Store the account update.

pub fn add_root(&self, fork: u64)[src]

Trait Implementations

impl Default for AccountsDB[src]

Auto Trait Implementations

impl Send for AccountsDB

impl Sync for AccountsDB

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err