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

Method invalidate_code

crates/execution/txpool/src/validator.rs:173–181  ·  view source on GitHub ↗

Invalidates an account's trusted-delegation classification. Uses the non-promoting `peek_mut`: invalidation is driven by every canonical state diff, so an account with frequent code churn must not promote itself to most-recently-used and displace fresher, fully-valid entries. A surviving partially-invalidated entry keeps its recency.

(&mut self, account: Address)

Source from the content-addressed store, hash-verified

171 /// promote itself to most-recently-used and displace fresher, fully-valid
172 /// entries. A surviving partially-invalidated entry keeps its recency.
173 pub fn invalidate_code(&mut self, account: Address) {
174 let remove = self.entries.peek_mut(&account).is_some_and(|entry| {
175 entry.1 = None;
176 entry.0.is_none()
177 });
178 if remove {
179 self.entries.pop(&account);
180 }
181 }
182
183 /// Invalidates the account-state classification associated with `slot`.
184 ///

Calls 1

popMethod · 0.45