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

Method deepCopy

core/state/state_object.go:275–287  ·  view source on GitHub ↗
(db *StateDB)

Source from the content-addressed store, hash-verified

273func (c *stateObject) ReturnGas(gas *big.Int) {}
274
275func (self *stateObject) deepCopy(db *StateDB) *stateObject {
276 stateObject := newObject(db, self.address, self.data)
277 if self.trie != nil {
278 stateObject.trie = db.db.CopyTrie(self.trie)
279 }
280 stateObject.code = self.code
281 stateObject.dirtyStorage = self.dirtyStorage.Copy()
282 stateObject.cachedStorage = self.dirtyStorage.Copy()
283 stateObject.suicided = self.suicided
284 stateObject.dirtyCode = self.dirtyCode
285 stateObject.deleted = self.deleted
286 return stateObject
287}
288
289//
290// Attribute accessors

Callers 2

StorageTrieMethod · 0.80
CopyMethod · 0.80

Calls 3

newObjectFunction · 0.85
CopyTrieMethod · 0.65
CopyMethod · 0.45

Tested by

no test coverage detected