cmd/evm, core/vm, tests: changed DisableVm to EnableVm
This commit is contained in:
@ -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"
|
||||
|
@ -46,7 +46,7 @@ func runVmBench(test vmBench, b *testing.B) {
|
||||
}
|
||||
env := NewEnv()
|
||||
|
||||
DisableJit = test.nojit
|
||||
EnableJit = !test.nojit
|
||||
ForceJit = test.forcejit
|
||||
|
||||
b.ResetTimer()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user