forked from cerc-io/plugeth
Merge pull request #1966 from karalabe/fix-recover-noparam-panic
cmd/geth: fix recover command crash if no param is supplied
This commit is contained in:
commit
76390ef892
@ -542,10 +542,10 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int, i
|
|||||||
func blockRecovery(ctx *cli.Context) {
|
func blockRecovery(ctx *cli.Context) {
|
||||||
utils.CheckLegalese(utils.MustDataDir(ctx))
|
utils.CheckLegalese(utils.MustDataDir(ctx))
|
||||||
|
|
||||||
arg := ctx.Args().First()
|
if len(ctx.Args()) < 1 {
|
||||||
if len(ctx.Args()) < 1 && len(arg) > 0 {
|
|
||||||
glog.Fatal("recover requires block number or hash")
|
glog.Fatal("recover requires block number or hash")
|
||||||
}
|
}
|
||||||
|
arg := ctx.Args().First()
|
||||||
|
|
||||||
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
|
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
|
||||||
utils.CheckLegalese(cfg.DataDir)
|
utils.CheckLegalese(cfg.DataDir)
|
||||||
|
Loading…
Reference in New Issue
Block a user