Skip to content

Commit 19b0745

Browse files
committed
feat: impl faster cost tracker for default cost fns
* add cost calculation checks to replay-block commands * add prop testing to cost replacements * apply lints to costs module * add `CostValues` trait to reduce repetitive code in the default cost calculations. * add artificial stall to force long-running tx in `tests::nakamoto_integrations::skip_mining_long_tx`
1 parent 5655256 commit 19b0745

File tree

12 files changed

+3666
-59
lines changed

12 files changed

+3666
-59
lines changed

clarity/src/vm/contexts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,10 @@ impl<'a, 'hooks> OwnedEnvironment<'a, 'hooks> {
715715
})
716716
}
717717

718+
pub fn is_mainnet(&self) -> bool {
719+
self.context.mainnet
720+
}
721+
718722
#[cfg(any(test, feature = "testing"))]
719723
pub fn stx_faucet(&mut self, recipient: &PrincipalData, amount: u128) {
720724
self.execute_in_env::<_, _, crate::vm::errors::Error>(

clarity/src/vm/costs/cost_functions.rs

Lines changed: 326 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)