light: implemented VMState.Empty() (#3357)
This commit is contained in:
committed by
Felix Lange
parent
e4bf004560
commit
665bb43a4c
@ -201,14 +201,19 @@ func (self *StateObject) Copy() *StateObject {
|
||||
// Attribute accessors
|
||||
//
|
||||
|
||||
// empty returns whether the account is considered empty.
|
||||
func (self *StateObject) empty() bool {
|
||||
return self.nonce == 0 && self.balance.BitLen() == 0 && bytes.Equal(self.codeHash, emptyCodeHash)
|
||||
}
|
||||
|
||||
// Balance returns the account balance
|
||||
func (self *StateObject) Balance() *big.Int {
|
||||
return self.balance
|
||||
}
|
||||
|
||||
// Address returns the address of the contract/account
|
||||
func (c *StateObject) Address() common.Address {
|
||||
return c.address
|
||||
func (self *StateObject) Address() common.Address {
|
||||
return self.address
|
||||
}
|
||||
|
||||
// Code returns the contract code
|
||||
|
Reference in New Issue
Block a user