[release/1.4.9] Revert "core: update DAO soft-fork number, clean up the code"

This reverts commit aefffc9ed8.
This commit is contained in:
Péter Szilágyi
2016-06-29 11:53:06 +03:00
parent f4aebd4c8d
commit 3eef19598e
10 changed files with 67 additions and 49 deletions

View File

@ -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()))
}