aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm_debug.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-28 20:26:30 +0800
committerobscuren <geffobscura@gmail.com>2014-10-28 20:26:30 +0800
commit48125a25eb9f4ece2613559ced5075bde1c75c7a (patch)
tree17d6e70c3d34f8ddb31e8a4d4e7c23086b38eec6 /vm/vm_debug.go
parent7849b7e97873ea443b480f45aa4fe6ffbb41cdb0 (diff)
downloadgo-tangerine-48125a25eb9f4ece2613559ced5075bde1c75c7a.tar.gz
go-tangerine-48125a25eb9f4ece2613559ced5075bde1c75c7a.tar.zst
go-tangerine-48125a25eb9f4ece2613559ced5075bde1c75c7a.zip
Added missing requires on SSTORE SLOAD
Diffstat (limited to 'vm/vm_debug.go')
-rw-r--r--vm/vm_debug.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go
index d38373411..1e45813bc 100644
--- a/vm/vm_debug.go
+++ b/vm/vm_debug.go
@@ -169,9 +169,13 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
gas.Set(ethutil.Big0)
case SLOAD:
+ require(1)
+
gas.Set(GasSLoad)
// Memory resize & Gas
case SSTORE:
+ require(2)
+
var mult *big.Int
y, x := stack.Peekn()
val := closure.GetStorage(x)
@@ -179,7 +183,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
// 0 => non 0
mult = ethutil.Big3
} else if val.BigInt().Cmp(ethutil.Big0) != 0 && len(y.Bytes()) == 0 {
- state.Refund(closure.caller.Address(), big.NewInt(100), closure.Price)
+ state.Refund(closure.caller.Address(), GasSStoreRefund, closure.Price)
mult = ethutil.Big0
} else {