Skip to content

Commit a96d6c6

Browse files
authored
cmd/utils: remove jit flag handling (#3273)
The jit config options are not handled, but random selection still took place, printing confusing messages.
1 parent 4dd3e7f commit a96d6c6

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

cmd/utils/flags.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ import (
2222
"io/ioutil"
2323
"math"
2424
"math/big"
25-
"math/rand"
2625
"os"
2726
"path/filepath"
2827
"runtime"
2928
"strconv"
3029
"strings"
31-
"time"
3230

3331
"github.com/ethereum/ethash"
3432
"github.com/ethereum/go-ethereum/accounts"
@@ -717,16 +715,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
717715
Fatalf("The %v flags are mutually exclusive", netFlags)
718716
}
719717

720-
// initialise new random number generator
721-
rand := rand.New(rand.NewSource(time.Now().UnixNano()))
722-
// get enabled jit flag
723-
jitEnabled := ctx.GlobalBool(VMEnableJitFlag.Name)
724-
// if the jit is not enabled enable it for 10 pct of the people
725-
if !jitEnabled && rand.Float64() < 0.1 {
726-
jitEnabled = true
727-
glog.V(logger.Info).Infoln("You're one of the lucky few that will try out the JIT VM (random). If you get a consensus failure please be so kind to report this incident with the block hash that failed. You can switch to the regular VM by setting --jitvm=false")
728-
}
729-
730718
ethConf := &eth.Config{
731719
Etherbase: MakeEtherbase(stack.AccountManager(), ctx),
732720
ChainConfig: MakeChainConfig(ctx, stack),
@@ -742,8 +730,6 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
742730
ExtraData: MakeMinerExtra(extra, ctx),
743731
NatSpec: ctx.GlobalBool(NatspecEnabledFlag.Name),
744732
DocRoot: ctx.GlobalString(DocRootFlag.Name),
745-
EnableJit: jitEnabled,
746-
ForceJit: ctx.GlobalBool(VMForceJitFlag.Name),
747733
GasPrice: common.String2Big(ctx.GlobalString(GasPriceFlag.Name)),
748734
GpoMinGasPrice: common.String2Big(ctx.GlobalString(GpoMinGasPriceFlag.Name)),
749735
GpoMaxGasPrice: common.String2Big(ctx.GlobalString(GpoMaxGasPriceFlag.Name)),

0 commit comments

Comments
 (0)