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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go
index a54620d55..121a2ec5c 100644
--- a/core/state/state_object.go
+++ b/core/state/state_object.go
@@ -273,9 +273,9 @@ func (self *StateObject) Code(db trie.Database) []byte {
return code
}
-func (self *StateObject) SetCode(code []byte) {
+func (self *StateObject) SetCode(codeHash common.Hash, code []byte) {
self.code = code
- self.data.CodeHash = crypto.Keccak256(code)
+ self.data.CodeHash = codeHash[:]
self.dirtyCode = true
if self.onDirty != nil {
self.onDirty(self.Address())