MCPcopy Create free account
hub / github.com/CPChain/chain / updateRoot

Method updateRoot

core/state/state_object.go:217–220  ·  view source on GitHub ↗

UpdateRoot sets the trie root to the current root hash of

(db Database)

Source from the content-addressed store, hash-verified

215
216// UpdateRoot sets the trie root to the current root hash of
217func (self *stateObject) updateRoot(db Database) {
218 self.updateTrie(db)
219 self.data.Root = self.trie.Hash()
220}
221
222// CommitTrie the storage trie of the object to db.
223// This updates the trie root.

Callers 1

FinaliseMethod · 0.80

Calls 2

updateTrieMethod · 0.95
HashMethod · 0.65

Tested by

no test coverage detected