pub struct BankHashCache { /* private fields */ }Implementations§
Source§impl BankHashCache
impl BankHashCache
pub fn new(bank_forks: Arc<RwLock<BankForks>>) -> Self
pub fn dumped_slot_subscription(&self) -> DumpedSlotSubscription
Sourcepub fn hash(
&mut self,
slot: Slot,
slots_dumped: &mut MutexGuard<'_, bool>,
) -> Option<Hash>
pub fn hash( &mut self, slot: Slot, slots_dumped: &mut MutexGuard<'_, bool>, ) -> Option<Hash>
Should only be used after slots_dumped is acquired from dumped_slot_subscription to
guarantee synchronicity with self.bank_forks. Multiple calls to hash will only be
consistent with each other if slots_dumped was not released in between, as otherwise a dump
could have occurred inbetween.
pub fn root(&mut self) -> Slot
Sourcepub fn get_root_bank_and_prune_cache(&mut self) -> Arc<Bank>
pub fn get_root_bank_and_prune_cache(&mut self) -> Arc<Bank>
Returns the root bank and also prunes cache of any slots < root
Auto Trait Implementations§
impl Freeze for BankHashCache
impl !RefUnwindSafe for BankHashCache
impl Send for BankHashCache
impl Sync for BankHashCache
impl Unpin for BankHashCache
impl !UnwindSafe for BankHashCache
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