cmd/geth: usb is off by default (#21984)

pull/22122/head
Guillaume Ballet 4 years ago committed by GitHub
parent 9584f56b9d
commit 664903dc88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmd/geth/main.go
  2. 3
      cmd/geth/usage.go
  3. 11
      cmd/utils/flags.go

@ -68,6 +68,7 @@ var (
utils.KeyStoreDirFlag,
utils.ExternalSignerFlag,
utils.NoUSBFlag,
utils.USBFlag,
utils.SmartCardDaemonPathFlag,
utils.EthashCacheDirFlag,
utils.EthashCachesInMemoryFlag,

@ -37,7 +37,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils.DataDirFlag,
utils.AncientFlag,
utils.KeyStoreDirFlag,
utils.NoUSBFlag,
utils.USBFlag,
utils.SmartCardDaemonPathFlag,
utils.NetworkIdFlag,
utils.GoerliFlag,
@ -219,6 +219,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{
{
Name: "ALIASED (deprecated)",
Flags: append([]cli.Flag{
utils.NoUSBFlag,
utils.LegacyRPCEnabledFlag,
utils.LegacyRPCListenAddrFlag,
utils.LegacyRPCPortFlag,

@ -119,7 +119,11 @@ var (
}
NoUSBFlag = cli.BoolFlag{
Name: "nousb",
Usage: "Disables monitoring for and managing USB hardware wallets",
Usage: "Disables monitoring for and managing USB hardware wallets (deprecated)",
}
USBFlag = cli.BoolFlag{
Name: "usb",
Usage: "Enable monitoring and management of USB hardware wallets",
}
SmartCardDaemonPathFlag = cli.StringFlag{
Name: "pcscdpath",
@ -1225,8 +1229,11 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
if ctx.GlobalIsSet(LightKDFFlag.Name) {
cfg.UseLightweightKDF = ctx.GlobalBool(LightKDFFlag.Name)
}
if ctx.GlobalIsSet(USBFlag.Name) {
cfg.NoUSB = !ctx.GlobalBool(USBFlag.Name)
}
if ctx.GlobalIsSet(NoUSBFlag.Name) {
cfg.NoUSB = ctx.GlobalBool(NoUSBFlag.Name)
log.Warn("Option nousb is deprecated and USB is deactivated by default. Use --usb to enable")
}
if ctx.GlobalIsSet(InsecureUnlockAllowedFlag.Name) {
cfg.InsecureUnlockAllowed = ctx.GlobalBool(InsecureUnlockAllowedFlag.Name)

Loading…
Cancel
Save