test, cmd/evm, core, core/vm: illegal code hash implementation
This implements a generic approach to enabling soft forks by allowing anyone to put in hashes of contracts that should not be interacted from. This will help "The DAO" in their endevour to stop any whithdrawals from any DAO contract by convincing the mining community to accept their code hash.
This commit is contained in:
committed by
Péter Szilágyi
parent
599e3c7b3f
commit
7a5b571c67
@ -85,6 +85,11 @@ func exec(env vm.Environment, caller vm.ContractRef, address, codeAddr *common.A
|
||||
createAccount = true
|
||||
}
|
||||
|
||||
// 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())
|
||||
|
Reference in New Issue
Block a user