diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-11 06:27:30 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-12 00:43:22 +0800 |
commit | 9cacec70f9af77aaf9bf7f48b90f16ebc6d36298 (patch) | |
tree | bdea8f53f8058294dc7f0659c317e553b5d4c65b /core | |
parent | 32395ddb891f3a32bc1295296a0887ed9479eeb0 (diff) | |
download | dexon-9cacec70f9af77aaf9bf7f48b90f16ebc6d36298.tar.gz dexon-9cacec70f9af77aaf9bf7f48b90f16ebc6d36298.tar.zst dexon-9cacec70f9af77aaf9bf7f48b90f16ebc6d36298.zip |
cmd/evm, core/vm, tests: changed DisableVm to EnableVm
Diffstat (limited to 'core')
-rw-r--r-- | core/block_processor.go | 12 | ||||
-rw-r--r-- | core/vm/jit_test.go | 2 | ||||
-rw-r--r-- | core/vm/settings.go | 6 | ||||
-rw-r--r-- | core/vm/vm.go | 2 |
4 files changed, 6 insertions, 16 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index 477215356..829e4314c 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -354,18 +354,8 @@ func (sm *BlockProcessor) GetLogs(block *types.Block) (logs state.Logs, err erro for _, receipt := range receipts { logs = append(logs, receipt.Logs()...) } - return } - - // TODO: remove backward compatibility - var ( - parent = sm.bc.GetBlock(block.ParentHash()) - state = state.New(parent.Root(), sm.chainDb) - ) - - sm.TransitionState(state, parent, block, true) - - return state.Logs(), nil + return logs, nil } // See YP section 4.3.4. "Block Header Validity" diff --git a/core/vm/jit_test.go b/core/vm/jit_test.go index 5b3feea99..b9e2c6999 100644 --- a/core/vm/jit_test.go +++ b/core/vm/jit_test.go @@ -46,7 +46,7 @@ func runVmBench(test vmBench, b *testing.B) { } env := NewEnv() - DisableJit = test.nojit + EnableJit = !test.nojit ForceJit = test.forcejit b.ResetTimer() diff --git a/core/vm/settings.go b/core/vm/settings.go index 0cd931b6a..f9296f6c8 100644 --- a/core/vm/settings.go +++ b/core/vm/settings.go @@ -17,9 +17,9 @@ package vm var ( - DisableJit bool = true // Disable the JIT VM - ForceJit bool // Force the JIT, skip byte VM - MaxProgSize int // Max cache size for JIT Programs + EnableJit bool // Enables the JIT VM + ForceJit bool // Force the JIT, skip byte VM + MaxProgSize int // Max cache size for JIT Programs ) const defaultJitMaxCache int = 64 diff --git a/core/vm/vm.go b/core/vm/vm.go index c292b45d1..da764004a 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -64,7 +64,7 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { codehash = crypto.Sha3Hash(context.Code) // codehash is used when doing jump dest caching program *Program ) - if !DisableJit { + if EnableJit { // Fetch program status. // * If ready run using JIT // * If unknown, compile in a seperate goroutine |