[−][src]Struct solana_runtime::accounts_db::AccountsDB
Fields
accounts_index: AccountsIndex<AccountInfo>
Keeps tracks of index into AppendVec on a per slot basis
storage: 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>>
cluster_type: Option<ClusterType>
Implementations
impl AccountsDB
[src]
pub fn new(paths: Vec<PathBuf>, cluster_type: &ClusterType) -> Self
[src]
pub fn file_size(&self) -> u64
[src]
pub fn clean_accounts(&self, max_clean_root: Option<Slot>)
[src]
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
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 remove_unrooted_slot(&self, remove_slot: Slot)
[src]
pub fn hash_stored_account(
slot: Slot,
account: &StoredAccount<'_>,
cluster_type: &ClusterType
) -> Hash
[src]
slot: Slot,
account: &StoredAccount<'_>,
cluster_type: &ClusterType
) -> Hash
pub fn hash_account(
slot: Slot,
account: &Account,
pubkey: &Pubkey,
cluster_type: &ClusterType
) -> Hash
[src]
slot: Slot,
account: &Account,
pubkey: &Pubkey,
cluster_type: &ClusterType
) -> Hash
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 blake3_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, u64)>,
fanout: usize
) -> Hash
[src]
hashes: Vec<(Pubkey, Hash, u64)>,
fanout: usize
) -> Hash
pub fn checked_sum_for_capitalization<T: Iterator<Item = u64>>(
balances: T
) -> u64
[src]
balances: T
) -> u64
pub fn account_balance_for_capitalization(
lamports: u64,
owner: &Pubkey,
executable: bool
) -> u64
[src]
lamports: u64,
owner: &Pubkey,
executable: bool
) -> u64
pub fn get_accounts_hash(&self, slot: Slot) -> Hash
[src]
pub fn update_accounts_hash(
&self,
slot: Slot,
ancestors: &Ancestors
) -> (Hash, u64)
[src]
&self,
slot: Slot,
ancestors: &Ancestors
) -> (Hash, u64)
pub fn verify_bank_hash_and_lamports(
&self,
slot: Slot,
ancestors: &Ancestors,
total_lamports: u64
) -> Result<(), BankHashVerificationError>
[src]
&self,
slot: Slot,
ancestors: &Ancestors,
total_lamports: u64
) -> Result<(), BankHashVerificationError>
pub fn get_accounts_delta_hash(&self, slot: Slot) -> Hash
[src]
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> AbiExample for T
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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.
pub 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.
pub 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>,