[−][src]Struct clarity_repl::clarity::clarity::ClarityBlockConnection
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]
&'b mut self
) -> ClarityTransactionConnection<'b>
pub fn as_transaction<F, R>(&mut self, todo: F) -> R where
F: FnOnce(&mut ClarityTransactionConnection<'_>) -> R,
[src]
F: FnOnce(&mut ClarityTransactionConnection<'_>) -> R,
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]
F: FnOnce(ClarityDatabase<'_>) -> (R, ClarityDatabase<'_>),
Do something with ownership of the underlying DB that involves only reading.
fn with_analysis_db_readonly<F, R>(&mut self, to_do: F) -> R where
F: FnOnce(&mut AnalysisDatabase<'_>) -> R,
[src]
F: FnOnce(&mut AnalysisDatabase<'_>) -> R,
fn with_clarity_db_readonly<F, R>(&mut self, to_do: F) -> R where
F: FnOnce(&mut ClarityDatabase<'_>) -> R,
[src]
F: FnOnce(&mut ClarityDatabase<'_>) -> R,
fn with_readonly_clarity_env<F, R>(
&mut self,
sender: PrincipalData,
cost_track: LimitedCostTracker,
to_do: F
) -> Result<R, InterpreterError> where
F: FnOnce(&mut Environment<'_, '_>) -> Result<R, InterpreterError>,
[src]
&mut self,
sender: PrincipalData,
cost_track: LimitedCostTracker,
to_do: F
) -> Result<R, InterpreterError> where
F: FnOnce(&mut Environment<'_, '_>) -> Result<R, InterpreterError>,
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ClarityBlockConnection<'a>
impl<'a> !Send for ClarityBlockConnection<'a>
impl<'a> !Sync for ClarityBlockConnection<'a>
impl<'a> Unpin for ClarityBlockConnection<'a>
impl<'a> !UnwindSafe for ClarityBlockConnection<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,