pub struct EpochAccountsHashManager { /* private fields */ }
Expand description
Manage the epoch accounts hash
Handles setting when an EAH calculation is requested and when it completes. Also handles waiting for in-flight calculations to complete when the “stop” Bank must include it.
Implementations§
source§impl Manager
impl Manager
sourcepub fn new_invalid() -> Self
pub fn new_invalid() -> Self
Create a new epoch accounts hash manager, with the initial state set to Invalid
sourcepub fn new_valid(epoch_accounts_hash: EpochAccountsHash, slot: Slot) -> Self
pub fn new_valid(epoch_accounts_hash: EpochAccountsHash, slot: Slot) -> Self
Create a new epoch accounts hash manager, with the initial state set to Valid
sourcepub fn set_in_flight(&self, slot: Slot)
pub fn set_in_flight(&self, slot: Slot)
An epoch accounts hash calculation has been requested; update our state
sourcepub fn set_valid(&self, epoch_accounts_hash: EpochAccountsHash, slot: Slot)
pub fn set_valid(&self, epoch_accounts_hash: EpochAccountsHash, slot: Slot)
An epoch accounts hash calculation has completed; update our state
sourcepub fn wait_get_epoch_accounts_hash(&self) -> EpochAccountsHash
pub fn wait_get_epoch_accounts_hash(&self) -> EpochAccountsHash
Get the epoch accounts hash
If an EAH calculation is in-flight, then this call will block until it completes.
sourcepub fn try_get_epoch_accounts_hash(&self) -> Option<EpochAccountsHash>
pub fn try_get_epoch_accounts_hash(&self) -> Option<EpochAccountsHash>
Get the epoch accounts hash
This fn does not block, and will only yield an EAH if the state is Valid
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Manager
impl RefUnwindSafe for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl UnwindSafe for Manager
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