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

Function insert_account

crates/proof/executor/src/db/mod.rs:433–441  ·  view source on GitHub ↗

Pre-populate the trie with a live account so that subsequent destroy bundles have something to delete (TrieNode::delete errors on a missing key).

(db: &mut TrieDB<NoopTrieDBProvider, NoopTrieHinter>, address: Address)

Source from the content-addressed store, hash-verified

431 // Pre-populate the trie with a live account so that subsequent destroy bundles have
432 // something to delete (TrieNode::delete errors on a missing key).
433 fn insert_account(db: &mut TrieDB<NoopTrieDBProvider, NoopTrieHinter>, address: Address) {
434 let account = BundleAccount::new(
435 None,
436 Some(AccountInfo { balance: U256::from(100u64), ..Default::default() }),
437 Default::default(),
438 AccountStatus::InMemoryChange,
439 );
440 db.state_root(&bundle_with_account(address, account)).unwrap();
441 }
442
443 // A destroyed account (info = None) that already lived in the parent trie must be
444 // removed from the state root for every revm status that maps to "account is gone".

Calls 2

bundle_with_accountFunction · 0.85
state_rootMethod · 0.45