From b6b17e5648ba2d8298d41c384d89caf82a27b271 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 19 Sep 2016 02:07:20 -0400 Subject: [PATCH] core/state, light: remove unused StateObject.initCode --- core/state/state_object.go | 3 --- core/state/state_test.go | 3 --- light/state_object.go | 3 --- 3 files changed, 9 deletions(-) diff --git a/core/state/state_object.go b/core/state/state_object.go index 20da1006fc..c5462316dd 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -71,8 +71,6 @@ type StateObject struct { codeHash []byte // The code for this account code Code - // Temporarily initialisation code - initCode Code // Cached storage (flushed when updated) storage Storage @@ -188,7 +186,6 @@ func (self *StateObject) Copy() *StateObject { stateObject.nonce = self.nonce stateObject.trie = self.trie stateObject.code = self.code - stateObject.initCode = common.CopyBytes(self.initCode) stateObject.storage = self.storage.Copy() stateObject.remove = self.remove stateObject.dirty = self.dirty diff --git a/core/state/state_test.go b/core/state/state_test.go index 5a6cb0b501..69cf083cfa 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -200,9 +200,6 @@ func compareStateObjects(so0, so1 *StateObject, t *testing.T) { if !bytes.Equal(so0.code, so1.code) { t.Fatalf("Code mismatch: have %v, want %v", so0.code, so1.code) } - if !bytes.Equal(so0.initCode, so1.initCode) { - t.Fatalf("InitCode mismatch: have %v, want %v", so0.initCode, so1.initCode) - } for k, v := range so1.storage { if so0.storage[k] != v { diff --git a/light/state_object.go b/light/state_object.go index 030653c770..08c209d7d8 100644 --- a/light/state_object.go +++ b/light/state_object.go @@ -79,8 +79,6 @@ type StateObject struct { codeHash []byte // The code for this account code Code - // Temporarily initialisation code - initCode Code // Cached storage (flushed when updated) storage Storage @@ -189,7 +187,6 @@ func (self *StateObject) Copy() *StateObject { stateObject.nonce = self.nonce stateObject.trie = self.trie stateObject.code = common.CopyBytes(self.code) - stateObject.initCode = common.CopyBytes(self.initCode) stateObject.storage = self.storage.Copy() stateObject.remove = self.remove stateObject.dirty = self.dirty