[][src]Struct clarity_repl::clarity::clarity::ClarityBlockConnection

pub struct ClarityBlockConnection<'a> { /* fields omitted */ }

A high-level interface for Clarity VM interactions within a single block.

Implementations

impl<'_> ClarityBlockConnection<'_>[src]

pub fn reset_block_cost(&mut self, cost: ExecutionCost)[src]

Reset the block's total execution to the given cost, if there is a cost tracker at all. Used by the miner to "undo" applying a transaction that exceeded the budget.

pub fn cost_so_far(&self) -> ExecutionCost[src]

Get the current cost so far

impl<'a> ClarityBlockConnection<'a>[src]

pub fn rollback_block(self)[src]

Rolls back all changes in the current block by (1) dropping all writes from the current MARF tip, (2) rolling back side-storage

pub fn commit_to_block(self, final_bhh: &StacksBlockId) -> LimitedCostTracker[src]

Commits all changes in the current block by (1) committing the current MARF tip to storage, (2) committing side-storage. Commits all changes in the current block by (1) committing the current MARF tip to storage, (2) committing side-storage. Commits to a different block hash than the one opened (i.e. since the caller may not have known the "real" block hash at the time of opening).

pub fn commit_mined_block(self, bhh: &StacksBlockId) -> LimitedCostTracker[src]

Commits all changes in the current block by (1) committing the current MARF tip to storage, (2) committing side-storage. before this saves, it updates the metadata headers in the sidestore so that they don't get stepped on after a miner re-executes a constructed block.

pub fn start_transaction_processing<'b>(
    &'b mut self
) -> ClarityTransactionConnection<'b>
[src]

pub fn as_transaction<F, R>(&mut self, todo: F) -> R where
    F: FnOnce(&mut ClarityTransactionConnection<'_>) -> R, 
[src]

Trait Implementations

impl<'_> ClarityConnection for ClarityBlockConnection<'_>[src]

fn with_clarity_db_readonly_owned<F, R>(&mut self, to_do: F) -> R where
    F: FnOnce(ClarityDatabase<'_>) -> (R, ClarityDatabase<'_>)
[src]

Do something with ownership of the underlying DB that involves only reading.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.