aboutsummaryrefslogtreecommitdiffstats
path: root/core/execution.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-29 16:44:29 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-06-29 16:44:29 +0800
commit67e9d3348679d87cca127de4da8eb4223c43aae2 (patch)
treec20eb3ea801347e6d4c67ab4aca16f0d4a5b25a7 /core/execution.go
parent219859f8bbfa3a1549d02f6bcbaa41db55b4b8fe (diff)
downloaddexon-67e9d3348679d87cca127de4da8eb4223c43aae2.tar
dexon-67e9d3348679d87cca127de4da8eb4223c43aae2.tar.gz
dexon-67e9d3348679d87cca127de4da8eb4223c43aae2.tar.bz2
dexon-67e9d3348679d87cca127de4da8eb4223c43aae2.tar.lz
dexon-67e9d3348679d87cca127de4da8eb4223c43aae2.tar.xz
dexon-67e9d3348679d87cca127de4da8eb4223c43aae2.tar.zst
dexon-67e9d3348679d87cca127de4da8eb4223c43aae2.zip
Revert "core: update DAO soft-fork number, clean up the code"
This reverts commit ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.
Diffstat (limited to 'core/execution.go')
-rw-r--r--core/execution.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/execution.go b/core/execution.go
index d2008bc3e..7f4c64758 100644
--- a/core/execution.go
+++ b/core/execution.go
@@ -84,10 +84,12 @@ func exec(env vm.Environment, caller vm.ContractRef, address, codeAddr *common.A
address = &addr
createAccount = true
}
- // Mark all contracts doing outbound value transfers to allow DAO filtering.
+
+ // mark the code hash if the execution is a call, callcode or delegate.
if value.Cmp(common.Big0) > 0 {
env.MarkCodeHash(env.Db().GetCodeHash(caller.Address()))
}
+
snapshotPreTransfer := env.MakeSnapshot()
var (
from = env.Db().GetAccount(caller.Address())
@@ -146,7 +148,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()))
}