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 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