cmd/evm, core/vm, tests: changed DisableVm to EnableVm

This commit is contained in:
Jeffrey Wilcke
2015-08-11 00:27:30 +02:00
parent 32395ddb89
commit 9cacec70f9
10 changed files with 20 additions and 30 deletions

View File

@ -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"

View File

@ -46,7 +46,7 @@ func runVmBench(test vmBench, b *testing.B) {
}
env := NewEnv()
DisableJit = test.nojit
EnableJit = !test.nojit
ForceJit = test.forcejit
b.ResetTimer()

View File

@ -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

View File

@ -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