MCPcopy Create free account
hub / github.com/base/base / insert

Method insert

crates/execution/trie/src/cursor_cache.rs:106–111  ·  view source on GitHub ↗

Records `result`, which the wrapped cursor returned for `op` and is now positioned at.

(&mut self, op: CursorOp<K>, result: &Option<(K, V)>)

Source from the content-addressed store, hash-verified

104
105 /// Records `result`, which the wrapped cursor returned for `op` and is now positioned at.
106 pub fn insert(&mut self, op: CursorOp<K>, result: &Option<(K, V)>) {
107 self.misses += 1;
108 self.position = result.as_ref().map(|(key, _)| key.clone());
109 self.pending = None;
110 self.results.insert((self.hashed_address, op), result.clone());
111 }
112
113 /// Marks the cursor unpositioned, for example after a reset or address change.
114 pub fn unposition(&mut self, hashed_address: Option<B256>) {

Callers 15

block_diffFunction · 0.45
store_accountsFunction · 0.45
diff_for_all_accountsFunction · 0.45
create_fixtureFunction · 0.45
store_trie_updatesMethod · 0.45
newMethod · 0.45
prune_earliest_stateMethod · 0.45
store_hashed_accountsMethod · 0.45
store_hashed_storagesMethod · 0.45

Calls 2

as_refMethod · 0.45
cloneMethod · 0.45