Skip to content

Commit

Permalink
Comment added
Browse files Browse the repository at this point in the history
  • Loading branch information
smiasojed committed Jul 10, 2024
1 parent 3a8c2d2 commit 45603b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions substrate/frame/contracts/src/wasm/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ pub enum RuntimeCosts {
UnlockDelegateDependency,
}

// For the function that modifies the storage, the benchmarks are done with one item in the
// transient_storage (BTreeMap). To consider the worst-case scenario, the weight of the overhead of
// writing to a full BTreeMap should be included. On top of that, the rollback weight is added,
// which is the worst scenario.
macro_rules! cost_write {
// cost_write!(name, a, b, c) -> T::WeightInfo::name(a, b, c).saturating_add(T::WeightInfo::rollback_transient_storage())
// .saturating_add(T::WeightInfo::set_transient_storage_full().saturating_sub(T::WeightInfo::set_transient_storage_empty())
Expand Down

0 comments on commit 45603b8

Please sign in to comment.