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

Method root_hash

chain/src/account.rs:118–125  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

116 }
117
118 pub(crate) fn root_hash(&mut self) -> Result<H256> {
119 let root_hash = self
120 .trie
121 .root_hash()
122 .map_err(|e| ChainError::CannotCreateRootHash(format!("account_trie: {}", e)))?;
123
124 Ok(H256::from_slice(root_hash.as_bytes()))
125 }
126}
127
128#[cfg(test)]

Callers 2

root_hash_changesFunction · 0.45
process_transactionsMethod · 0.45

Calls

no outgoing calls

Tested by 1

root_hash_changesFunction · 0.36