Struct snarkvm_debug::prelude::store::CommitteeStore
pub struct CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,{ /* private fields */ }Expand description
The committee store.
Implementations§
§impl<N, C> CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,
impl<N, C> CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,
pub fn open(dev: Option<u16>) -> Result<CommitteeStore<N, C>, Error>
pub fn open(dev: Option<u16>) -> Result<CommitteeStore<N, C>, Error>
Initializes the committee store.
pub fn from(storage: C) -> CommitteeStore<N, C>
pub fn from(storage: C) -> CommitteeStore<N, C>
Initializes a committee store from storage.
pub fn start_atomic(&self)
pub fn start_atomic(&self)
Starts an atomic batch write operation.
pub fn is_atomic_in_progress(&self) -> bool
pub fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
pub fn atomic_checkpoint(&self)
pub fn atomic_checkpoint(&self)
Checkpoints the atomic batch.
pub fn clear_latest_checkpoint(&self)
pub fn clear_latest_checkpoint(&self)
Clears the latest atomic batch checkpoint.
pub fn atomic_rewind(&self)
pub fn atomic_rewind(&self)
Rewinds the atomic batch to the previous checkpoint.
pub fn abort_atomic(&self)
pub fn abort_atomic(&self)
Aborts an atomic batch write operation.
pub fn finish_atomic(&self) -> Result<(), Error>
pub fn finish_atomic(&self) -> Result<(), Error>
Finishes an atomic batch write operation.
§impl<N, C> CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,
impl<N, C> CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,
§impl<N, C> CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,
impl<N, C> CommitteeStore<N, C>where
N: Network,
C: CommitteeStorage<N>,
pub fn current_round(&self) -> Result<u64, Error>
pub fn current_round(&self) -> Result<u64, Error>
Returns the current round.
pub fn current_height(&self) -> Result<u32, Error>
pub fn current_height(&self) -> Result<u32, Error>
Returns the current height.
pub fn current_committee(&self) -> Result<Committee<N>, Error>
pub fn current_committee(&self) -> Result<Committee<N>, Error>
Returns the current committee.
pub fn get_height_for_round(&self, round: u64) -> Result<Option<u32>, Error>
pub fn get_height_for_round(&self, round: u64) -> Result<Option<u32>, Error>
Returns the height for the given round.
Trait Implementations§
§impl<N, C> Clone for CommitteeStore<N, C>
impl<N, C> Clone for CommitteeStore<N, C>
§fn clone(&self) -> CommitteeStore<N, C>
fn clone(&self) -> CommitteeStore<N, C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<N, C> RefUnwindSafe for CommitteeStore<N, C>where
C: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, C> Send for CommitteeStore<N, C>
impl<N, C> Sync for CommitteeStore<N, C>
impl<N, C> Unpin for CommitteeStore<N, C>
impl<N, C> UnwindSafe for CommitteeStore<N, C>where
C: UnwindSafe,
N: UnwindSafe,
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