aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm_env.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-29 16:53:23 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-06-29 16:53:23 +0800
commitc793cb33857d3259febced1a42f457cf9ffbe0bd (patch)
tree63690340b9a59df28bd5567e8f9625f2139ac6c2 /core/vm_env.go
parent3eef19598e02ee02ad27c36978bf4ba4b6d41493 (diff)
downloadgo-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.tar
go-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.tar.gz
go-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.tar.bz2
go-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.tar.lz
go-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.tar.xz
go-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.tar.zst
go-tangerine-c793cb33857d3259febced1a42f457cf9ffbe0bd.zip
[release/1.4.9] Revert "core: add voting and result tracking for the dao soft-fork"
This reverts commit f31a3a251afad1d4c7169bc530fe60471df36122.
Diffstat (limited to 'core/vm_env.go')
-rw-r--r--core/vm_env.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/vm_env.go b/core/vm_env.go
index a485bfd03..3ef61b8ce 100644
--- a/core/vm_env.go
+++ b/core/vm_env.go
@@ -25,9 +25,7 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
)
-// BlockedCodeHashes is a set of EVM code hashes that this node should block
-// sending funds from.
-var BlockedCodeHashes map[common.Hash]struct{}
+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
@@ -51,7 +49,7 @@ type VMEnv struct {
depth int // Current execution depth
msg Message // Message appliod
- codeHashes map[common.Hash]struct{} // code hashes collected during execution
+ CodeHashes []common.Hash // code hashes collected during execution
header *types.Header // Header information
chain *BlockChain // Blockchain handle
@@ -62,7 +60,6 @@ type VMEnv struct {
func NewEnv(state *state.StateDB, chainConfig *ChainConfig, chain *BlockChain, msg Message, header *types.Header, cfg vm.Config) *VMEnv {
env := &VMEnv{
chainConfig: chainConfig,
- codeHashes: make(map[common.Hash]struct{}),
chain: chain,
state: state,
header: header,
@@ -79,8 +76,7 @@ func NewEnv(state *state.StateDB, chainConfig *ChainConfig, chain *BlockChain, m
return env
}
-func (self *VMEnv) MarkCodeHash(hash common.Hash) { self.codeHashes[hash] = struct{}{} }
-func (self *VMEnv) GetMarkedCodeHashes() map[common.Hash]struct{} { return self.codeHashes }
+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 }