diff options
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/accountcmd_test.go | 14 | ||||
-rw-r--r-- | cmd/geth/config.go | 2 | ||||
-rw-r--r-- | cmd/geth/main.go | 5 | ||||
-rw-r--r-- | cmd/geth/usage.go | 7 |
4 files changed, 17 insertions, 11 deletions
diff --git a/cmd/geth/accountcmd_test.go b/cmd/geth/accountcmd_test.go index 66e3e02a4..3ea22ccfa 100644 --- a/cmd/geth/accountcmd_test.go +++ b/cmd/geth/accountcmd_test.go @@ -134,7 +134,7 @@ Fatal: could not decrypt key with given passphrase func TestUnlockFlag(t *testing.T) { datadir := tmpDatadirWithKeystore(t) geth := runGeth(t, - "--datadir", datadir, "--nat", "none", "--nodiscover", "--dev", + "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "js", "testdata/empty.js") geth.Expect(` @@ -158,7 +158,7 @@ Passphrase: {{.InputLine "foobar"}} func TestUnlockFlagWrongPassword(t *testing.T) { datadir := tmpDatadirWithKeystore(t) geth := runGeth(t, - "--datadir", datadir, "--nat", "none", "--nodiscover", "--dev", + "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a") defer geth.ExpectExit() geth.Expect(` @@ -177,7 +177,7 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could func TestUnlockFlagMultiIndex(t *testing.T) { datadir := tmpDatadirWithKeystore(t) geth := runGeth(t, - "--datadir", datadir, "--nat", "none", "--nodiscover", "--dev", + "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "0,2", "js", "testdata/empty.js") geth.Expect(` @@ -204,7 +204,7 @@ Passphrase: {{.InputLine "foobar"}} func TestUnlockFlagPasswordFile(t *testing.T) { datadir := tmpDatadirWithKeystore(t) geth := runGeth(t, - "--datadir", datadir, "--nat", "none", "--nodiscover", "--dev", + "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--password", "testdata/passwords.txt", "--unlock", "0,2", "js", "testdata/empty.js") geth.ExpectExit() @@ -224,7 +224,7 @@ func TestUnlockFlagPasswordFile(t *testing.T) { func TestUnlockFlagPasswordFileWrongPassword(t *testing.T) { datadir := tmpDatadirWithKeystore(t) geth := runGeth(t, - "--datadir", datadir, "--nat", "none", "--nodiscover", "--dev", + "--datadir", datadir, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--password", "testdata/wrong-passwords.txt", "--unlock", "0,2") defer geth.ExpectExit() geth.Expect(` @@ -235,7 +235,7 @@ Fatal: Failed to unlock account 0 (could not decrypt key with given passphrase) func TestUnlockFlagAmbiguous(t *testing.T) { store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes") geth := runGeth(t, - "--keystore", store, "--nat", "none", "--nodiscover", "--dev", + "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a", "js", "testdata/empty.js") defer geth.ExpectExit() @@ -273,7 +273,7 @@ In order to avoid this warning, you need to remove the following duplicate key f func TestUnlockFlagAmbiguousWrongPassword(t *testing.T) { store := filepath.Join("..", "..", "accounts", "keystore", "testdata", "dupes") geth := runGeth(t, - "--keystore", store, "--nat", "none", "--nodiscover", "--dev", + "--keystore", store, "--nat", "none", "--nodiscover", "--maxpeers", "0", "--port", "0", "--unlock", "f466859ead1932d743d622cb74fc058882e8648a") defer geth.ExpectExit() diff --git a/cmd/geth/config.go b/cmd/geth/config.go index d3600f141..d55a5e08d 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -155,7 +155,7 @@ func makeFullNode(ctx *cli.Context) *node.Node { // Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode shhEnabled := enableWhisper(ctx) - shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DevModeFlag.Name) + shhAutoEnabled := !ctx.GlobalIsSet(utils.WhisperEnabledFlag.Name) && ctx.GlobalIsSet(utils.DeveloperFlag.Name) if shhEnabled || shhAutoEnabled { if ctx.GlobalIsSet(utils.WhisperMaxMessageSizeFlag.Name) { cfg.Shh.MaxMessageSize = uint32(ctx.Int(utils.WhisperMaxMessageSizeFlag.Name)) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 88f3528f3..8bd27b5c6 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -99,7 +99,8 @@ var ( utils.NetrestrictFlag, utils.NodeKeyFileFlag, utils.NodeKeyHexFlag, - utils.DevModeFlag, + utils.DeveloperFlag, + utils.DeveloperPeriodFlag, utils.TestnetFlag, utils.RinkebyFlag, utils.VMEnableDebugFlag, @@ -270,7 +271,7 @@ func startNode(ctx *cli.Context, stack *node.Node) { } }() // Start auxiliary services if enabled - if ctx.GlobalBool(utils.MiningEnabledFlag.Name) { + if ctx.GlobalBool(utils.MiningEnabledFlag.Name) || ctx.GlobalBool(utils.DeveloperFlag.Name) { // Mining only makes sense if a full Ethereum node is running var ethereum *eth.Ethereum if err := stack.Service(ðereum); err != nil { diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 80861d852..5bb2255f3 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -72,7 +72,6 @@ var AppHelpFlagGroups = []flagGroup{ utils.NetworkIdFlag, utils.TestnetFlag, utils.RinkebyFlag, - utils.DevModeFlag, utils.SyncModeFlag, utils.EthStatsURLFlag, utils.IdentityFlag, @@ -81,6 +80,12 @@ var AppHelpFlagGroups = []flagGroup{ utils.LightKDFFlag, }, }, + {Name: "DEVELOPER CHAIN", + Flags: []cli.Flag{ + utils.DeveloperFlag, + utils.DeveloperPeriodFlag, + }, + }, { Name: "ETHASH", Flags: []cli.Flag{ |