aboutsummaryrefslogtreecommitdiffstats
path: root/core/execution.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-23 17:47:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-06-23 22:16:43 +0800
commitba784bdf36f2daf7827ec1ec864f3393ba8d86a0 (patch)
tree4fa3104b0e668ba5490d5468a61b58501f56ef79 /core/execution.go
parentc4de28938ff8c688c4444c8b3e8e28a52cbc62ff (diff)
downloadgo-tangerine-ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.tar.gz
go-tangerine-ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.tar.zst
go-tangerine-ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.zip
core: update DAO soft-fork number, clean up the code
Diffstat (limited to 'core/execution.go')
-rw-r--r--core/execution.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/execution.go b/core/execution.go
index 7f4c64758..d2008bc3e 100644
--- a/core/execution.go
+++ b/core/execution.go
@@ -84,12 +84,10 @@ func exec(env vm.Environment, caller vm.ContractRef, address, codeAddr *common.A
address = &addr
createAccount = true
}
-
- // mark the code hash if the execution is a call, callcode or delegate.
+ // Mark all contracts doing outbound value transfers to allow DAO filtering.
if value.Cmp(common.Big0) > 0 {
env.MarkCodeHash(env.Db().GetCodeHash(caller.Address()))
}
-
snapshotPreTransfer := env.MakeSnapshot()
var (
from = env.Db().GetAccount(caller.Address())
@@ -148,7 +146,7 @@ func execDelegateCall(env vm.Environment, caller vm.ContractRef, originAddr, toA
caller.ReturnGas(gas, gasPrice)
return nil, common.Address{}, vm.DepthError
}
-
+ // Mark all contracts doing outbound value transfers to allow DAO filtering.
if value.Cmp(common.Big0) > 0 {
env.MarkCodeHash(env.Db().GetCodeHash(caller.Address()))
}