Struct solana_runtime::accounts_hash::AccountsHasher
source · pub struct AccountsHasher {
pub filler_account_suffix: Option<Pubkey>,
pub zero_lamport_accounts: ZeroLamportAccounts,
}
Fields§
§filler_account_suffix: Option<Pubkey>
§zero_lamport_accounts: ZeroLamportAccounts
Implementations§
source§impl AccountsHasher
impl AccountsHasher
sourcepub fn filler_accounts_enabled(&self) -> bool
pub fn filler_accounts_enabled(&self) -> bool
true if it is possible that there are filler accounts present
pub fn calculate_hash(hashes: Vec<Vec<Hash>>) -> (Hash, usize)
pub fn compute_merkle_root(hashes: Vec<(Pubkey, Hash)>, fanout: usize) -> Hash
pub fn compute_merkle_root_recurse(hashes: Vec<Hash>, fanout: usize) -> Hash
pub fn div_ceil(x: usize, y: usize) -> usize
pub fn compute_merkle_root_loop<T, F>( hashes: Vec<T>, fanout: usize, extractor: F ) -> Hashwhere F: Fn(&T) -> &Hash + Sync, T: Sync,
fn calculate_three_level_chunks( total_hashes: usize, fanout: usize, max_levels_per_pass: Option<usize>, specific_level_count: Option<usize> ) -> (usize, usize, bool)
pub fn compute_merkle_root_from_slices<'a, F, T>( total_hashes: usize, fanout: usize, max_levels_per_pass: Option<usize>, get_hash_slice_starting_at_index: F, specific_level_count: Option<usize> ) -> (Hash, Vec<Hash>)where F: Fn(usize) -> &'a [T] + Sync, T: Borrow<Hash> + Sync + 'a,
pub fn compute_merkle_root_from_slices_recurse( hashes: Vec<Hash>, fanout: usize, max_levels_per_pass: Option<usize>, specific_level_count: Option<usize> ) -> (Hash, Vec<Hash>)
pub fn accumulate_account_hashes(hashes: Vec<(Pubkey, Hash)>) -> Hash
pub fn sort_hashes_by_pubkey(hashes: &mut Vec<(Pubkey, Hash)>)
pub fn compare_two_hash_entries( a: &CalculateHashIntermediate, b: &CalculateHashIntermediate ) -> Ordering
pub fn checked_cast_for_capitalization(balance: u128) -> u64
sourcepub(crate) fn get_binned_data<'a>(
sorted_data_by_pubkey: &'a Vec<&'a [CalculateHashIntermediate]>,
bins: usize,
bin_range: &Range<usize>
) -> Vec<Vec<&'a [CalculateHashIntermediate]>>
pub(crate) fn get_binned_data<'a>( sorted_data_by_pubkey: &'a Vec<&'a [CalculateHashIntermediate]>, bins: usize, bin_range: &Range<usize> ) -> Vec<Vec<&'a [CalculateHashIntermediate]>>
return references to cache hash data, grouped by bin, sourced from ‘sorted_data_by_pubkey’, which is probably a mmapped file.
sourcefn de_dup_accounts<'a>(
&self,
sorted_data_by_pubkey: &'a [SortedDataByPubkey<'a>],
stats: &mut HashStats,
max_bin: usize
) -> (Vec<AccountHashesFile>, u64)
fn de_dup_accounts<'a>( &self, sorted_data_by_pubkey: &'a [SortedDataByPubkey<'a>], stats: &mut HashStats, max_bin: usize ) -> (Vec<AccountHashesFile>, u64)
returns:
Vec, with one entry per bin
for each entry, Vec
fn get_item<'a, 'b>( min_index: usize, bin: usize, first_items: &'a mut Vec<Pubkey>, pubkey_division: &'b [SortedDataByPubkey<'b>], indexes: &'a mut [usize], first_item_to_pubkey_division: &'a mut Vec<usize> ) -> &'b CalculateHashIntermediate
fn de_dup_accounts_in_parallel<'a>( &self, pubkey_division: &'a [SortedDataByPubkey<'a>], pubkey_bin: usize ) -> (AccountHashesFile, u64, usize)
fn is_filler_account(&self, pubkey: &Pubkey) -> bool
pub fn rest_of_hash_calculation( &self, data_sections_by_pubkey: Vec<SortedDataByPubkey<'_>>, stats: &mut HashStats ) -> (Hash, u64)
Trait Implementations§
source§impl Debug for AccountsHasher
impl Debug for AccountsHasher
Auto Trait Implementations§
impl RefUnwindSafe for AccountsHasher
impl Send for AccountsHasher
impl Sync for AccountsHasher
impl Unpin for AccountsHasher
impl UnwindSafe for AccountsHasher
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more