diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-09 18:28:35 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-09 18:28:35 +0800 |
commit | 19efebe91e354ad86c171e01c47f9c2f3ef5cf9f (patch) | |
tree | a35203550c3e6bec84ee47cebb94e5e93eecd3d8 /vm | |
parent | 93cdffca3ad23eedae6f0591e1357c2429b31811 (diff) | |
download | go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.tar go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.tar.gz go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.tar.bz2 go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.tar.lz go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.tar.xz go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.tar.zst go-tangerine-19efebe91e354ad86c171e01c47f9c2f3ef5cf9f.zip |
Updated tests and fixed suicide
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -736,6 +736,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I self.Printf(" => (%x) %v", receiver.Address()[:4], balance) receiver.AddBalance(balance) + statedb.Delete(context.Address()) fallthrough @@ -905,6 +906,10 @@ func (self *Vm) calculateGasAndSize(context *Context, caller ContextRef, op OpCo g = GasStorageMod } gas.Set(g) + case SUICIDE: + if !statedb.IsDeleted(context.Address()) { + statedb.Refund(self.env.Origin(), RefundSuicide) + } case MLOAD: newMemSize = calcMemSize(stack.Peek(), u256(32)) case MSTORE8: |