diff options
author | Felix Lange <fjl@twurst.com> | 2015-11-05 20:15:23 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-11-05 20:15:23 +0800 |
commit | 76390ef8925ff0a3ae4092664e4e94550ae46de4 (patch) | |
tree | c3c2227651407f5645473f9f7b2781b7a20d9d92 /cmd/geth/main.go | |
parent | 636f67f232ed44aebafac93e9d3b4f010a598815 (diff) | |
parent | 90655736ed11859d185849f4f5a374b30095d932 (diff) | |
download | dexon-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.gz dexon-76390ef8925ff0a3ae4092664e4e94550ae46de4.tar.zst dexon-76390ef8925ff0a3ae4092664e4e94550ae46de4.zip |
Merge pull request #1966 from karalabe/fix-recover-noparam-panic
cmd/geth: fix recover command crash if no param is supplied
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r-- | cmd/geth/main.go | 4 |
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) |