[−][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
next_id: AtomicUsize
distribute the accounts across storage lists
thread_pool: ThreadPool
Thread pool used for par_iter
Methods
impl AccountsDB
[src]
pub fn new(paths: Option<String>) -> Self
[src]
pub fn paths(&self) -> String
[src]
pub fn update_from_stream<R: Read>(
&self,
stream: &mut BufReader<R>
) -> Result<(), Error>
[src]
&self,
stream: &mut BufReader<R>
) -> Result<(), Error>
pub fn has_accounts(&self, fork: Fork) -> bool
[src]
pub fn scan_accounts<F, A>(
&self,
ancestors: &HashMap<Fork, usize>,
scan_func: F
) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Fork)>),
A: Default,
[src]
&self,
ancestors: &HashMap<Fork, usize>,
scan_func: F
) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Fork)>),
A: Default,
pub fn scan_account_storage<F, B>(&self, fork_id: Fork, scan_func: F) -> Vec<B> where
F: Fn(&StoredAccount, AppendVecId, &mut B),
F: Send + Sync,
B: Send + Default,
[src]
F: Fn(&StoredAccount, AppendVecId, &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<Fork, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, Fork)>
[src]
storage: &AccountStorage,
ancestors: &HashMap<Fork, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, Fork)>
pub fn load_slow(
&self,
ancestors: &HashMap<Fork, usize>,
pubkey: &Pubkey
) -> Option<(Account, Fork)>
[src]
&self,
ancestors: &HashMap<Fork, usize>,
pubkey: &Pubkey
) -> Option<(Account, Fork)>
pub fn purge_fork(&self, fork: Fork)
[src]
pub fn store(&self, fork_id: Fork, accounts: &HashMap<&Pubkey, &Account>)
[src]
Store the account update.
pub fn add_root(&self, fork: Fork)
[src]
Trait Implementations
Auto Trait Implementations
impl Unpin for AccountsDB
impl Send for AccountsDB
impl Sync for AccountsDB
impl !RefUnwindSafe for AccountsDB
impl !UnwindSafe for AccountsDB
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,