[−][src]Struct solana_runtime::accounts_db::AccountsDB
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]
F: Fn(&StoredAccount, &mut B),
F: Send + Sync,
B: Send + Default,
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]
storage: &AccountStorage,
ancestors: &HashMap<u64, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, u64)>
pub fn load_slow(
&self,
ancestors: &HashMap<u64, usize>,
pubkey: &Pubkey
) -> Option<(Account, u64)>
[src]
&self,
ancestors: &HashMap<u64, usize>,
pubkey: &Pubkey
) -> Option<(Account, u64)>
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]
fn default() -> 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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,