pub struct AccountsHasher<'a> {
pub zero_lamport_accounts: ZeroLamportAccounts,
pub dir_for_temp_cache_files: PathBuf,
/* private fields */
}
Fields§
§zero_lamport_accounts: ZeroLamportAccounts
§dir_for_temp_cache_files: PathBuf
The directory where temporary cache files are put
Implementations§
Source§impl<'a> AccountsHasher<'a>
impl<'a> AccountsHasher<'a>
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, ) -> Hash
pub fn accumulate_account_hashes(hashes: Vec<(Pubkey, AccountHash)>) -> Hash
pub fn compare_two_hash_entries( a: &CalculateHashIntermediate, b: &CalculateHashIntermediate, ) -> Ordering
pub fn checked_cast_for_capitalization(balance: u128) -> u64
Sourcepub fn rest_of_hash_calculation(
&self,
sorted_data_by_pubkey: &[&[CalculateHashIntermediate]],
stats: &mut HashStats,
) -> (Hash, u64)
pub fn rest_of_hash_calculation( &self, sorted_data_by_pubkey: &[&[CalculateHashIntermediate]], stats: &mut HashStats, ) -> (Hash, u64)
input: vec: group of slot data, ordered by Slot (low to high) vec: [..] - items found in that slot range Sorted by: Pubkey, higher Slot, higher Write version (if pubkey =)
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AccountsHasher<'a>
impl<'a> RefUnwindSafe for AccountsHasher<'a>
impl<'a> Send for AccountsHasher<'a>
impl<'a> Sync for AccountsHasher<'a>
impl<'a> Unpin for AccountsHasher<'a>
impl<'a> UnwindSafe for AccountsHasher<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more