From 67e9d3348679d87cca127de4da8eb4223c43aae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 29 Jun 2016 11:44:29 +0300 Subject: Revert "core: update DAO soft-fork number, clean up the code" This reverts commit ba784bdf36f2daf7827ec1ec864f3393ba8d86a0. --- core/vm_env.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/vm_env.go') diff --git a/core/vm_env.go b/core/vm_env.go index a034c428e..4692c14c4 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -25,6 +25,10 @@ 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{} + // 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. -- cgit v1.2.3 From d55fc35df1ca4996048625421d4c475a437d273e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 29 Jun 2016 11:44:40 +0300 Subject: Revert "core: add voting and result tracking for the dao soft-fork" This reverts commit c4de28938ff8c688c4444c8b3e8e28a52cbc62ff. --- core/vm_env.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'core/vm_env.go') diff --git a/core/vm_env.go b/core/vm_env.go index 4692c14c4..1c1110280 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 } -- cgit v1.2.3 From 6362a9d6102b26e926b3e73563267fc75cb30f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 29 Jun 2016 11:44:51 +0300 Subject: Revert "test, cmd/evm, core, core/vm: illegal code hash implementation" This reverts commit 7a5b571c671e70e0e4807cf971c15e2d1e09d33d. --- core/vm_env.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'core/vm_env.go') diff --git a/core/vm_env.go b/core/vm_env.go index 1c1110280..599672382 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -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 } -- cgit v1.2.3