diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-03-24 20:06:10 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-04-01 19:44:58 +0800 |
commit | bbeaab7e64f50fb303008b065894f58d7563c7ad (patch) | |
tree | e10e1c48f411fa2b63313e4e27a4d3311ab04797 /miner/worker.go | |
parent | c58079461bafe508bea9233e2b81852df5188f57 (diff) | |
download | go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.tar go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.tar.gz go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.tar.bz2 go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.tar.lz go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.tar.xz go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.tar.zst go-tangerine-bbeaab7e64f50fb303008b065894f58d7563c7ad.zip |
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.
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go index c45945b87..a5e2516fe 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -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 |