Skip to content

Commit 60bcb5c

Browse files
authored
Merge pull request #5859 from stacks-network/feat/fast-default-cost-tracking
Feat: Implement faster cost tracker for default cost functions
2 parents 5655256 + d8eac9e commit 60bcb5c

File tree

13 files changed

+3667
-59
lines changed

13 files changed

+3667
-59
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1414

1515
### Changed
1616

17+
- Implement faster cost tracker for default cost functions in Clarity
1718
- Miner will stop waiting for signatures on a block if the Stacks tip advances (causing the block it had proposed to be invalid).
1819
- Logging improvements:
1920
- P2P logs now includes a reason for dropping a peer or neighbor

clarity/src/vm/contexts.rs

+4
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

+326
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)