[−][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>>
dead_slots: RwLock<HashSet<Slot>>
Methods
impl AccountsDB
[src]
pub fn new(paths: Vec<PathBuf>) -> Self
[src]
pub fn accounts_from_stream<R: Read, P: AsRef<Path>>(
&self,
stream: &mut BufReader<R>,
stream_append_vecs_path: P
) -> Result<(), IOError>
[src]
&self,
stream: &mut BufReader<R>,
stream_append_vecs_path: P
) -> Result<(), IOError>
pub fn clean_accounts(&self)
[src]
pub fn process_dead_slots(&self)
[src]
pub fn process_stale_slot(&self)
[src]
pub fn shrink_all_stale_slots(&self)
[src]
pub fn scan_accounts<F, A>(
&self,
ancestors: &HashMap<Slot, usize>,
scan_func: F
) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Slot)>),
A: Default,
[src]
&self,
ancestors: &HashMap<Slot, usize>,
scan_func: F
) -> A where
F: Fn(&mut A, Option<(&Pubkey, Account, Slot)>),
A: Default,
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: &HashMap<Slot, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
[src]
storage: &AccountStorage,
ancestors: &HashMap<Slot, usize>,
accounts_index: &AccountsIndex<AccountInfo>,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
pub fn load_slow(
&self,
ancestors: &HashMap<Slot, usize>,
pubkey: &Pubkey
) -> Option<(Account, Slot)>
[src]
&self,
ancestors: &HashMap<Slot, usize>,
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) -> Hash
[src]
pub fn hash_account(slot: Slot, account: &Account, pubkey: &Pubkey) -> Hash
[src]
pub fn hash_account_data(
slot: Slot,
lamports: u64,
executable: bool,
rent_epoch: Epoch,
data: &[u8],
pubkey: &Pubkey
) -> Hash
[src]
slot: Slot,
lamports: u64,
executable: bool,
rent_epoch: Epoch,
data: &[u8],
pubkey: &Pubkey
) -> 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: &HashMap<Slot, usize>
) -> Hash
[src]
&self,
slot: Slot,
ancestors: &HashMap<Slot, usize>
) -> Hash
pub fn verify_bank_hash(
&self,
slot: Slot,
ancestors: &HashMap<Slot, usize>
) -> Result<(), BankHashVerificationError>
[src]
&self,
slot: Slot,
ancestors: &HashMap<Slot, usize>
) -> 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: &HashMap<Slot, usize>,
account_pubkeys: &[Pubkey]
)
[src]
&mut self,
ancestors: &HashMap<Slot, usize>,
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]
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>,