Trait era_test_node::deps::WriteStorage
source · pub trait WriteStorage: ReadStorage {
// Required methods
fn set_value(
&mut self,
key: StorageKey,
value: StorageValue
) -> StorageValue;
fn modified_storage_keys(&self) -> &HashMap<StorageKey, StorageValue>;
fn missed_storage_invocations(&self) -> usize;
}
Expand description
Functionality to write to the VM storage in a batch.
So far, this trait is implemented only for [zksync_state::StorageView
].
Required Methods§
sourcefn set_value(&mut self, key: StorageKey, value: StorageValue) -> StorageValue
fn set_value(&mut self, key: StorageKey, value: StorageValue) -> StorageValue
Sets the new value under a given key and returns the previous value.
sourcefn modified_storage_keys(&self) -> &HashMap<StorageKey, StorageValue>
fn modified_storage_keys(&self) -> &HashMap<StorageKey, StorageValue>
Returns a map with the key–value pairs updated by this batch.
sourcefn missed_storage_invocations(&self) -> usize
fn missed_storage_invocations(&self) -> usize
Returns the number of read / write ops for which the value was read from the underlying storage.