cmd/utils, miner: A/B testing JIT VM. Disabled for miners
This PR introduces a 10% probability that you'll run the client with the JIT enabled testing the new client and helps us potentially catch errors when reported. This feature is **disabled** for miners (disabling the JIT completely). The JIT can however be force for miners if they enable both --jitvm and --forcejit.
This commit is contained in:
committed by
Jeffrey Wilcke
parent
c58079461b
commit
bbeaab7e64
@ -662,7 +662,15 @@ func (env *Work) commitTransactions(mux *event.TypeMux, transactions types.Trans
|
||||
|
||||
func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, gp *core.GasPool) (error, vm.Logs) {
|
||||
snap := env.state.Copy()
|
||||
receipt, logs, _, err := core.ApplyTransaction(env.config, bc, gp, env.state, env.header, tx, env.header.GasUsed, env.config.VmConfig)
|
||||
|
||||
// this is a bit of a hack to force jit for the miners
|
||||
config := env.config.VmConfig
|
||||
if !(config.EnableJit && config.ForceJit) {
|
||||
config.EnableJit = false
|
||||
}
|
||||
config.ForceJit = false // disable forcing jit
|
||||
|
||||
receipt, logs, _, err := core.ApplyTransaction(env.config, bc, gp, env.state, env.header, tx, env.header.GasUsed, config)
|
||||
if err != nil {
|
||||
env.state.Set(snap)
|
||||
return err, nil
|
||||
|
Reference in New Issue
Block a user