Struct snarkvm_ledger_store::ExecutionStore
source · pub struct ExecutionStore<N: Network, E: ExecutionStorage<N>> { /* private fields */ }
Expand description
The execution store.
Implementations§
source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
sourcepub fn open(fee_store: FeeStore<N, E::FeeStorage>) -> Result<Self>
pub fn open(fee_store: FeeStore<N, E::FeeStorage>) -> Result<Self>
Initializes the execution store.
sourcepub fn insert(&self, transaction: &Transaction<N>) -> Result<()>
pub fn insert(&self, transaction: &Transaction<N>) -> Result<()>
Stores the given execution transaction
into storage.
sourcepub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
pub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the transaction for the given transaction ID
.
sourcepub fn start_atomic(&self)
pub fn start_atomic(&self)
Starts an atomic batch write operation.
sourcepub fn is_atomic_in_progress(&self) -> bool
pub fn is_atomic_in_progress(&self) -> bool
Checks if an atomic batch is in progress.
sourcepub fn atomic_checkpoint(&self)
pub fn atomic_checkpoint(&self)
Checkpoints the atomic batch.
sourcepub fn clear_latest_checkpoint(&self)
pub fn clear_latest_checkpoint(&self)
Clears the latest atomic batch checkpoint.
sourcepub fn atomic_rewind(&self)
pub fn atomic_rewind(&self)
Rewinds the atomic batch to the previous checkpoint.
sourcepub fn abort_atomic(&self)
pub fn abort_atomic(&self)
Aborts an atomic batch write operation.
sourcepub fn finish_atomic(&self) -> Result<()>
pub fn finish_atomic(&self) -> Result<()>
Finishes an atomic batch write operation.
source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
sourcepub fn get_transaction(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Transaction<N>>>
pub fn get_transaction( &self, transaction_id: &N::TransactionID ) -> Result<Option<Transaction<N>>>
Returns the transaction for the given transaction ID
.
sourcepub fn get_execution(
&self,
transaction_id: &N::TransactionID
) -> Result<Option<Execution<N>>>
pub fn get_execution( &self, transaction_id: &N::TransactionID ) -> Result<Option<Execution<N>>>
Returns the execution for the given transaction ID
.
source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
sourcepub fn find_transaction_id_from_transition_id(
&self,
transition_id: &N::TransitionID
) -> Result<Option<N::TransactionID>>
pub fn find_transaction_id_from_transition_id( &self, transition_id: &N::TransitionID ) -> Result<Option<N::TransactionID>>
Returns the transaction ID that executed the given transition ID
.
source§impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
impl<N: Network, E: ExecutionStorage<N>> ExecutionStore<N, E>
sourcepub fn execution_transaction_ids(
&self
) -> impl '_ + Iterator<Item = Cow<'_, N::TransactionID>>
pub fn execution_transaction_ids( &self ) -> impl '_ + Iterator<Item = Cow<'_, N::TransactionID>>
Returns an iterator over the execution transaction IDs, for all executions.
Trait Implementations§
source§impl<N: Clone + Network, E: Clone + ExecutionStorage<N>> Clone for ExecutionStore<N, E>
impl<N: Clone + Network, E: Clone + ExecutionStorage<N>> Clone for ExecutionStore<N, E>
source§fn clone(&self) -> ExecutionStore<N, E>
fn clone(&self) -> ExecutionStore<N, E>
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, E> RefUnwindSafe for ExecutionStore<N, E>where E: RefUnwindSafe, N: RefUnwindSafe,
impl<N, E> Send for ExecutionStore<N, E>
impl<N, E> Sync for ExecutionStore<N, E>
impl<N, E> Unpin for ExecutionStore<N, E>where E: Unpin, N: Unpin,
impl<N, E> UnwindSafe for ExecutionStore<N, E>where E: 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