aboutsummaryrefslogtreecommitdiffstats
path: root/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-20 09:21:13 +0800
committerobscuren <geffobscura@gmail.com>2014-12-20 09:21:13 +0800
commit1508a23a6fe3cc50f718bfd6c62caae056534c09 (patch)
tree78853077f6b961bf27c5bdf74673c255e96aba1d /state
parentf5b8f3d41b533d51eb81e895ed9b6aa31d7aaaef (diff)
downloadgo-tangerine-1508a23a6fe3cc50f718bfd6c62caae056534c09.tar.gz
go-tangerine-1508a23a6fe3cc50f718bfd6c62caae056534c09.tar.zst
go-tangerine-1508a23a6fe3cc50f718bfd6c62caae056534c09.zip
Minor updates on gas and removed/refactored old code.
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 {