[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:
Jeffrey Wilcke
2016-06-18 11:17:57 +02:00
committed by Péter Szilágyi
parent d2089e46f8
commit a9c94cbf48
11 changed files with 95 additions and 29 deletions

View File

@ -220,6 +220,7 @@ type ruleSet struct{}
func (ruleSet) IsHomestead(*big.Int) bool { return true }
func (self *VMEnv) MarkCodeHash(common.Hash) {}
func (self *VMEnv) RuleSet() vm.RuleSet { return ruleSet{} }
func (self *VMEnv) Vm() vm.Vm { return self.evm }
func (self *VMEnv) Db() vm.Database { return self.state }