aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/state_object.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-09-26 02:49:02 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-09-28 16:27:28 +0800
commitcd791bd855b55b95afc8a5c8f56b8bf67863d099 (patch)
tree3955fe3abf4079eee5412119043ade1b7001bb61 /core/state/state_object.go
parent863d166c7b0250cf2e99c8aad69578cdd144d386 (diff)
downloaddexon-cd791bd855b55b95afc8a5c8f56b8bf67863d099.tar.gz
dexon-cd791bd855b55b95afc8a5c8f56b8bf67863d099.tar.zst
dexon-cd791bd855b55b95afc8a5c8f56b8bf67863d099.zip
core, trie: replace state caches with trie journal
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())