Revert "test, cmd/evm, core, core/vm: illegal code hash implementation"

This reverts commit 7a5b571c67.
This commit is contained in:
Péter Szilágyi
2016-06-29 11:44:51 +03:00
parent d55fc35df1
commit 6362a9d610
11 changed files with 29 additions and 95 deletions

View File

@ -25,8 +25,6 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
)
var IllegalCodeHashes map[common.Hash]struct{}
// GetHashFn returns a function for which the VM env can query block hashes through
// up to the limit defined by the Yellow Paper and uses the given block chain
// to query for information.
@ -49,8 +47,6 @@ type VMEnv struct {
depth int // Current execution depth
msg Message // Message appliod
CodeHashes []common.Hash // code hashes collected during execution
header *types.Header // Header information
chain *BlockChain // Blockchain handle
logs []vm.StructLog // Logs for the custom structured logger
@ -76,8 +72,6 @@ func NewEnv(state *state.StateDB, chainConfig *ChainConfig, chain *BlockChain, m
return env
}
func (self *VMEnv) MarkCodeHash(hash common.Hash) { self.CodeHashes = append(self.CodeHashes, hash) }
func (self *VMEnv) RuleSet() vm.RuleSet { return self.chainConfig }
func (self *VMEnv) Vm() vm.Vm { return self.evm }
func (self *VMEnv) Origin() common.Address { f, _ := self.msg.From(); return f }