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

Method pushTrie

core/state/database.go:110–120  ·  view source on GitHub ↗
(t *trie.SecureTrie)

Source from the content-addressed store, hash-verified

108}
109
110func (db *cachingDB) pushTrie(t *trie.SecureTrie) {
111 db.mu.Lock()
112 defer db.mu.Unlock()
113
114 if len(db.pastTries) >= maxPastTries {
115 copy(db.pastTries, db.pastTries[1:])
116 db.pastTries[len(db.pastTries)-1] = t
117 } else {
118 db.pastTries = append(db.pastTries, t)
119 }
120}
121
122// OpenStorageTrie opens the storage trie of an account.
123func (db *cachingDB) OpenStorageTrie(addrHash, root common.Hash) (Trie, error) {

Callers 1

CommitMethod · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected