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