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

Method deleteStateObject

core/state/statedb.go:355–359  ·  view source on GitHub ↗

deleteStateObject removes the given object from the state trie.

(stateObject *stateObject)

Source from the content-addressed store, hash-verified

353
354// deleteStateObject removes the given object from the state trie.
355func (self *StateDB) deleteStateObject(stateObject *stateObject) {
356 stateObject.deleted = true
357 addr := stateObject.Address()
358 self.setError(self.trie.TryDelete(addr[:]))
359}
360
361// Retrieve a state object given by the address. Returns nil if not found.
362func (self *StateDB) getStateObject(addr common.Address) (stateObject *stateObject) {

Callers 2

FinaliseMethod · 0.95
CommitMethod · 0.95

Calls 3

setErrorMethod · 0.95
TryDeleteMethod · 0.80
AddressMethod · 0.65

Tested by

no test coverage detected