Struct snarkvm_ledger_store::FeeStore
source · pub struct FeeStore<N: Network, F: FeeStorage<N>> { /* private fields */ }
Expand description
The fee store.
Implementations§
source§impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
sourcepub fn open(
transition_store: TransitionStore<N, F::TransitionStorage>
) -> Result<Self>
pub fn open( transition_store: TransitionStore<N, F::TransitionStorage> ) -> Result<Self>
Initializes the fee store.
sourcepub fn insert(
&self,
transaction_id: N::TransactionID,
fee: &Fee<N>
) -> Result<()>
pub fn insert( &self, transaction_id: N::TransactionID, fee: &Fee<N> ) -> Result<()>
Stores the given (transaction_id, fee)
into storage.
sourcepub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
pub fn remove(&self, transaction_id: &N::TransactionID) -> Result<()>
Removes the fee for the given transaction ID
.
sourcepub fn transition_store(&self) -> &TransitionStore<N, F::TransitionStorage>
pub fn transition_store(&self) -> &TransitionStore<N, F::TransitionStorage>
Returns the transition store.
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, F: FeeStorage<N>> FeeStore<N, F>
impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
source§impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
impl<N: Network, F: FeeStorage<N>> FeeStore<N, F>
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 deployed the given transition ID
.
Trait Implementations§
Auto Trait Implementations§
impl<N, F> RefUnwindSafe for FeeStore<N, F>where F: RefUnwindSafe, N: RefUnwindSafe,
impl<N, F> Send for FeeStore<N, F>
impl<N, F> Sync for FeeStore<N, F>
impl<N, F> Unpin for FeeStore<N, F>where F: Unpin, N: Unpin,
impl<N, F> UnwindSafe for FeeStore<N, F>where F: 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