MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / new

Method new

chain/src/account.rs:22–26  ·  view source on GitHub ↗
(storage: Arc<Storage>)

Source from the content-addressed store, hash-verified

20
21impl AccountStorage {
22 pub(crate) fn new(storage: Arc<Storage>) -> Self {
23 Self {
24 trie: EthTrie::new(Arc::clone(&storage)),
25 }
26 }
27
28 pub(crate) fn upsert(&mut self, key: &Account, data: &AccountData) -> Result<()> {
29 self.trie

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected