[−][src]Struct solana_runtime::accounts_db::AccountsDB
Fields
accounts_index: RwLock<AccountsIndex<AccountInfo>>
Keeps tracks of index into AppendVec on a per slot basis
storage: RwLock<AccountStorage>
next_id: AtomicUsize
distribute the accounts across storage lists
shrink_candidate_slots: Mutex<Vec<Slot>>
thread_pool: ThreadPool
Thread pool used for par_iter
thread_pool_clean: ThreadPool
bank_hashes: RwLock<HashMap<Slot, BankHashInfo>>
Implementations
impl AccountsDB
[src]
pub fn new(paths: Vec<PathBuf>) -> Self
[src]
pub fn clean_accounts(&self)
[src]
pub fn process_dead_slots<'a>(
&'a self,
dead_slots_w: Option<RwLockWriteGuard<'a, HashSet<Slot>>>
)
[src]
&'a self,
dead_slots_w: Option<RwLockWriteGuard<'a, HashSet<Slot>>>
)
pub fn process_stale_slot(&self) -> usize
[src]
pub fn shrink_all_slots(&self)
[src]
pub fn scan_accounts<F, A>(&self, ancestors: &Ancestors, scan_func: F) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Slot)>),
A: Default,
[src]
F: Fn(&mut A, Option<(&Pubkey, Account, Slot)>),
A: Default,
pub fn range_scan_accounts<F, A, R>(
&self,
ancestors: &Ancestors,
range: R,
scan_func: F
) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Slot)>),
A: Default,
R: RangeBounds<Pubkey>,
[src]
&self,
ancestors: &Ancestors,
range: R,
scan_func: F
) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Slot)>),
A: Default,
R: RangeBounds<Pubkey>,
pub fn scan_account_storage<F, B>(&self, slot: Slot, scan_func: F) -> Vec<B> where
F: Fn(&StoredAccount, AppendVecId, &mut B) + Send + Sync,
B: Send + Default,
[src]
F: Fn(&StoredAccount, AppendVecId, &mut B) + Send + Sync,
B: Send + Default,
Scan a specific slot through all the account storage in parallel with sequential read
pub fn set_hash(&self, slot: Slot, parent_slot: Slot)
[src]
pub fn load(
storage: &AccountStorage,
ancestors: &Ancestors,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
[src]
storage: &AccountStorage,
ancestors: &Ancestors,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
pub fn load_slow(
&self,
ancestors: &Ancestors,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
[src]
&self,
ancestors: &Ancestors,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
pub fn purge_slot(&self, slot: Slot)
[src]
pub fn purge_slots(&self, slots: &HashSet<Slot>)
[src]
pub fn remove_unrooted_slot(&self, remove_slot: Slot)
[src]
pub fn hash_stored_account(
slot: Slot,
account: &StoredAccount,
include_owner: bool
) -> Hash
[src]
slot: Slot,
account: &StoredAccount,
include_owner: bool
) -> Hash
pub fn hash_account(
slot: Slot,
account: &Account,
pubkey: &Pubkey,
include_owner: bool
) -> Hash
[src]
slot: Slot,
account: &Account,
pubkey: &Pubkey,
include_owner: bool
) -> Hash
pub fn include_owner_in_hash(slot: Slot) -> bool
[src]
pub fn hash_account_data(
slot: Slot,
lamports: u64,
owner: &Pubkey,
executable: bool,
rent_epoch: Epoch,
data: &[u8],
pubkey: &Pubkey,
include_owner: bool
) -> Hash
[src]
slot: Slot,
lamports: u64,
owner: &Pubkey,
executable: bool,
rent_epoch: Epoch,
data: &[u8],
pubkey: &Pubkey,
include_owner: bool
) -> Hash
pub fn compute_merkle_root(hashes: Vec<(Pubkey, Hash)>, fanout: usize) -> Hash
[src]
pub fn get_accounts_hash(&self, slot: Slot) -> Hash
[src]
pub fn update_accounts_hash(&self, slot: Slot, ancestors: &Ancestors) -> Hash
[src]
pub fn verify_bank_hash(
&self,
slot: Slot,
ancestors: &Ancestors
) -> Result<(), BankHashVerificationError>
[src]
&self,
slot: Slot,
ancestors: &Ancestors
) -> Result<(), BankHashVerificationError>
pub fn get_accounts_delta_hash(&self, slot: Slot) -> Hash
[src]
pub fn clean_dead_slots(&self, dead_slots: &HashSet<Slot>)
[src]
pub fn freeze_accounts(
&mut self,
ancestors: &Ancestors,
account_pubkeys: &[Pubkey]
)
[src]
&mut self,
ancestors: &Ancestors,
account_pubkeys: &[Pubkey]
)
pub fn store(&self, slot: Slot, accounts: &[(&Pubkey, &Account)])
[src]
Store the account update.
pub fn add_root(&self, slot: Slot)
[src]
pub fn get_snapshot_storages(&self, snapshot_slot: Slot) -> SnapshotStorages
[src]
pub fn generate_index(&self)
[src]
Trait Implementations
impl Debug for AccountsDB
[src]
impl Default for AccountsDB
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AccountsDB
impl Send for AccountsDB
impl Sync for AccountsDB
impl Unpin for AccountsDB
impl !UnwindSafe for AccountsDB
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> From<T> for T
[src]
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,