aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/state_object.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/state/state_object.go')
-rw-r--r--core/state/state_object.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go
index 3496008a6..a54620d55 100644
--- a/core/state/state_object.go
+++ b/core/state/state_object.go
@@ -95,8 +95,6 @@ type Account struct {
Balance *big.Int
Root common.Hash // merkle root of the storage trie
CodeHash []byte
-
- codeSize *int
}
// NewObject creates a state object.
@@ -275,20 +273,9 @@ func (self *StateObject) Code(db trie.Database) []byte {
return code
}
-// CodeSize returns the size of the contract code associated with this object.
-func (self *StateObject) CodeSize(db trie.Database) int {
- if self.data.codeSize == nil {
- self.data.codeSize = new(int)
- *self.data.codeSize = len(self.Code(db))
- }
- return *self.data.codeSize
-}
-
func (self *StateObject) SetCode(code []byte) {
self.code = code
self.data.CodeHash = crypto.Keccak256(code)
- self.data.codeSize = new(int)
- *self.data.codeSize = len(code)
self.dirtyCode = true
if self.onDirty != nil {
self.onDirty(self.Address())