[release/1.4.8] 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.
(cherry picked from commit 7a5b571c67
)
This commit is contained in:
committed by
Péter Szilágyi
parent
d2089e46f8
commit
a9c94cbf48
@ -73,6 +73,8 @@ type Environment interface {
|
||||
DelegateCall(me ContractRef, addr common.Address, data []byte, gas, price *big.Int) ([]byte, error)
|
||||
// Create a new contract
|
||||
Create(me ContractRef, data []byte, gas, price, value *big.Int) ([]byte, common.Address, error)
|
||||
// Mark the code hash that was executed
|
||||
MarkCodeHash(hash common.Hash)
|
||||
}
|
||||
|
||||
// Vm is the basic interface for an implementation of the EVM.
|
||||
@ -96,6 +98,7 @@ type Database interface {
|
||||
|
||||
GetCode(common.Address) []byte
|
||||
SetCode(common.Address, []byte)
|
||||
GetCodeHash(common.Address) common.Hash
|
||||
|
||||
AddRefund(*big.Int)
|
||||
GetRefund() *big.Int
|
||||
|
Reference in New Issue
Block a user