mirror of https://github.com/status-im/op-geth.git
core/state, light: remove unused StateObject.initCode
This commit is contained in:
parent
88b012ad3b
commit
b6b17e5648
|
@ -71,8 +71,6 @@ type StateObject struct {
|
||||||
codeHash []byte
|
codeHash []byte
|
||||||
// The code for this account
|
// The code for this account
|
||||||
code Code
|
code Code
|
||||||
// Temporarily initialisation code
|
|
||||||
initCode Code
|
|
||||||
// Cached storage (flushed when updated)
|
// Cached storage (flushed when updated)
|
||||||
storage Storage
|
storage Storage
|
||||||
|
|
||||||
|
@ -188,7 +186,6 @@ func (self *StateObject) Copy() *StateObject {
|
||||||
stateObject.nonce = self.nonce
|
stateObject.nonce = self.nonce
|
||||||
stateObject.trie = self.trie
|
stateObject.trie = self.trie
|
||||||
stateObject.code = self.code
|
stateObject.code = self.code
|
||||||
stateObject.initCode = common.CopyBytes(self.initCode)
|
|
||||||
stateObject.storage = self.storage.Copy()
|
stateObject.storage = self.storage.Copy()
|
||||||
stateObject.remove = self.remove
|
stateObject.remove = self.remove
|
||||||
stateObject.dirty = self.dirty
|
stateObject.dirty = self.dirty
|
||||||
|
|
|
@ -200,9 +200,6 @@ func compareStateObjects(so0, so1 *StateObject, t *testing.T) {
|
||||||
if !bytes.Equal(so0.code, so1.code) {
|
if !bytes.Equal(so0.code, so1.code) {
|
||||||
t.Fatalf("Code mismatch: have %v, want %v", 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 {
|
for k, v := range so1.storage {
|
||||||
if so0.storage[k] != v {
|
if so0.storage[k] != v {
|
||||||
|
|
|
@ -79,8 +79,6 @@ type StateObject struct {
|
||||||
codeHash []byte
|
codeHash []byte
|
||||||
// The code for this account
|
// The code for this account
|
||||||
code Code
|
code Code
|
||||||
// Temporarily initialisation code
|
|
||||||
initCode Code
|
|
||||||
// Cached storage (flushed when updated)
|
// Cached storage (flushed when updated)
|
||||||
storage Storage
|
storage Storage
|
||||||
|
|
||||||
|
@ -189,7 +187,6 @@ func (self *StateObject) Copy() *StateObject {
|
||||||
stateObject.nonce = self.nonce
|
stateObject.nonce = self.nonce
|
||||||
stateObject.trie = self.trie
|
stateObject.trie = self.trie
|
||||||
stateObject.code = common.CopyBytes(self.code)
|
stateObject.code = common.CopyBytes(self.code)
|
||||||
stateObject.initCode = common.CopyBytes(self.initCode)
|
|
||||||
stateObject.storage = self.storage.Copy()
|
stateObject.storage = self.storage.Copy()
|
||||||
stateObject.remove = self.remove
|
stateObject.remove = self.remove
|
||||||
stateObject.dirty = self.dirty
|
stateObject.dirty = self.dirty
|
||||||
|
|
Loading…
Reference in New Issue