aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-11-05 20:15:23 +0800
committerFelix Lange <fjl@twurst.com>2015-11-05 20:15:23 +0800
commit76390ef8925ff0a3ae4092664e4e94550ae46de4 (patch)
treec3c2227651407f5645473f9f7b2781b7a20d9d92
parent636f67f232ed44aebafac93e9d3b4f010a598815 (diff)
parent90655736ed11859d185849f4f5a374b30095d932 (diff)
downloadgo-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar
go-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.gz
go-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.bz2
go-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.lz
go-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.xz
go-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.zst
go-tangerine-76390ef8925ff0a3ae4092664e4e94550ae46de4.zip
Merge pull request #1966 from karalabe/fix-recover-noparam-panic
cmd/geth: fix recover command crash if no param is supplied
-rw-r--r--cmd/geth/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index e74ddd0d0..0fb654eed 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -542,10 +542,10 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int, i
func blockRecovery(ctx *cli.Context) {
utils.CheckLegalese(utils.MustDataDir(ctx))
- arg := ctx.Args().First()
- if len(ctx.Args()) < 1 && len(arg) > 0 {
+ if len(ctx.Args()) < 1 {
glog.Fatal("recover requires block number or hash")
}
+ arg := ctx.Args().First()
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
utils.CheckLegalese(cfg.DataDir)