diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-28 20:22:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-28 20:22:04 +0800 |
commit | 7849b7e97873ea443b480f45aa4fe6ffbb41cdb0 (patch) | |
tree | 712ca431b606bc72e6b829d64eb491f092040e78 /vm/vm_debug.go | |
parent | 5920aa7be6fb973c7cbae34c9d4af03665933c51 (diff) | |
download | go-tangerine-7849b7e97873ea443b480f45aa4fe6ffbb41cdb0.tar.gz go-tangerine-7849b7e97873ea443b480f45aa4fe6ffbb41cdb0.tar.zst go-tangerine-7849b7e97873ea443b480f45aa4fe6ffbb41cdb0.zip |
Refund SSTORE properly
Diffstat (limited to 'vm/vm_debug.go')
-rw-r--r-- | vm/vm_debug.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 13446d6c0..d38373411 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -179,7 +179,8 @@ 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.AddBalance(closure.caller.Address(), new(big.Int).Mul(big.NewInt(100), closure.Price)) + state.Refund(closure.caller.Address(), big.NewInt(100), closure.Price) + mult = ethutil.Big0 } else { // non 0 => non 0 |