aboutsummaryrefslogtreecommitdiffstats
path: root/state
diff options
context:
space:
mode:
Diffstat (limited to 'state')
-rw-r--r--state/state.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/state/state.go b/state/state.go
index a8d611668..f77da72f0 100644
--- a/state/state.go
+++ b/state/state.go
@@ -94,6 +94,13 @@ func (self *StateDB) GetCode(addr []byte) []byte {
return nil
}
+func (self *StateDB) SetCode(addr, code []byte) {
+ stateObject := self.GetStateObject(addr)
+ if stateObject != nil {
+ stateObject.SetCode(code)
+ }
+}
+
func (self *StateDB) GetState(a, b []byte) []byte {
stateObject := self.GetStateObject(a)
if stateObject != nil {