Refund SSTORE properly

This commit is contained in:
obscuren
2014-10-28 13:22:04 +01:00
parent 5920aa7be6
commit 7849b7e978
2 changed files with 27 additions and 2 deletions

View File

@@ -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