aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-20 22:40:57 +0800
committerGitHub <noreply@github.com>2017-04-20 22:40:57 +0800
commit5aa21d8b32206867631950ac07645ec8854434b4 (patch)
tree0f9ce46f21e82cae15684083963a21d8ab587b11 /cmd
parent9fc90b6747c4eada258071cf65bebb6afd991a1c (diff)
parent6430e672c99f6d22582b104f8467d4bd8a4b5f6e (diff)
downloadgo-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.tar
go-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.tar.gz
go-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.tar.bz2
go-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.tar.lz
go-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.tar.xz
go-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.tar.zst
go-tangerine-5aa21d8b32206867631950ac07645ec8854434b4.zip
Merge pull request #14357 from karalabe/nousb-flag
cmd, node: add --nousb and node.Config.NoUSB to disable hw wallets
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/main.go1
-rw-r--r--cmd/geth/usage.go1
-rw-r--r--cmd/utils/flags.go7
3 files changed, 9 insertions, 0 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index c2d719d95..ad7b639a3 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -88,6 +88,7 @@ func init() {
utils.BootnodesFlag,
utils.DataDirFlag,
utils.KeyStoreDirFlag,
+ utils.NoUSBFlag,
utils.EthashCacheDirFlag,
utils.EthashCachesInMemoryFlag,
utils.EthashCachesOnDiskFlag,
diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go
index 457728154..9f06a308b 100644
--- a/cmd/geth/usage.go
+++ b/cmd/geth/usage.go
@@ -67,6 +67,7 @@ var AppHelpFlagGroups = []flagGroup{
configFileFlag,
utils.DataDirFlag,
utils.KeyStoreDirFlag,
+ utils.NoUSBFlag,
utils.NetworkIdFlag,
utils.TestNetFlag,
utils.DevModeFlag,
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index b35574c86..af9585bd0 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -115,6 +115,10 @@ var (
Name: "keystore",
Usage: "Directory for the keystore (default = inside the datadir)",
}
+ NoUSBFlag = cli.BoolFlag{
+ Name: "nousb",
+ Usage: "Disables monitoring for and managine USB hardware wallets",
+ }
EthashCacheDirFlag = DirectoryFlag{
Name: "ethash.cachedir",
Usage: "Directory to store the ethash verification caches (default = inside the datadir)",
@@ -729,6 +733,9 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
if ctx.GlobalIsSet(LightKDFFlag.Name) {
cfg.UseLightweightKDF = ctx.GlobalBool(LightKDFFlag.Name)
}
+ if ctx.GlobalIsSet(NoUSBFlag.Name) {
+ cfg.NoUSB = ctx.GlobalBool(NoUSBFlag.Name)
+ }
}
func setGPO(ctx *cli.Context, cfg *gasprice.Config) {