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

Method Empty

core/state/statedb.go:185–188  ·  view source on GitHub ↗

Empty returns whether the state object is either non-existent or empty according to the EIP161 specification (balance = nonce = code = 0)

(addr common.Address)

Source from the content-addressed store, hash-verified

183// Empty returns whether the state object is either non-existent
184// or empty according to the EIP161 specification (balance = nonce = code = 0)
185func (self *StateDB) Empty(addr common.Address) bool {
186 so := self.getStateObject(addr)
187 return so == nil || so.empty()
188}
189
190// Retrieve the balance from the given address or 0 if object not found
191func (self *StateDB) GetBalance(addr common.Address) *big.Int {

Callers

nothing calls this directly

Calls 2

getStateObjectMethod · 0.95
emptyMethod · 0.45

Tested by

no test coverage detected