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