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

Method Commit

core/state/database.go:168–174  ·  view source on GitHub ↗
(onleaf trie.LeafCallback)

Source from the content-addressed store, hash-verified

166}
167
168func (m cachedTrie) Commit(onleaf trie.LeafCallback) (common.Hash, error) {
169 root, err := m.SecureTrie.Commit(onleaf)
170 if err == nil {
171 m.db.pushTrie(m.SecureTrie)
172 }
173 return root, err
174}
175
176func (m cachedTrie) Prove(key []byte, fromLevel uint, proofDb database.Putter) error {
177 return m.SecureTrie.Prove(key, fromLevel, proofDb)

Callers

nothing calls this directly

Calls 2

pushTrieMethod · 0.80
CommitMethod · 0.65

Tested by

no test coverage detected