@@ -405,8 +405,6 @@ func makeDefaultExtra() []byte {
405405}
406406
407407func run (ctx * cli.Context ) {
408- utils .CheckLegalese (utils .MustDataDir (ctx ))
409-
410408 cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
411409 cfg .ExtraData = makeExtra (ctx )
412410
@@ -421,8 +419,6 @@ func run(ctx *cli.Context) {
421419}
422420
423421func attach (ctx * cli.Context ) {
424- utils .CheckLegalese (utils .MustDataDir (ctx ))
425-
426422 var client comms.EthereumClient
427423 var err error
428424 if ctx .Args ().Present () {
@@ -454,8 +450,6 @@ func attach(ctx *cli.Context) {
454450}
455451
456452func console (ctx * cli.Context ) {
457- utils .CheckLegalese (utils .MustDataDir (ctx ))
458-
459453 cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
460454 cfg .ExtraData = makeExtra (ctx )
461455
@@ -488,8 +482,6 @@ func console(ctx *cli.Context) {
488482}
489483
490484func execJSFiles (ctx * cli.Context ) {
491- utils .CheckLegalese (utils .MustDataDir (ctx ))
492-
493485 cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
494486 ethereum , err := eth .New (cfg )
495487 if err != nil {
@@ -515,8 +507,6 @@ func execJSFiles(ctx *cli.Context) {
515507}
516508
517509func unlockAccount (ctx * cli.Context , am * accounts.Manager , addr string , i int , inputpassphrases []string ) (addrHex , auth string , passphrases []string ) {
518- utils .CheckLegalese (ctx .GlobalString (utils .DataDirFlag .Name ))
519-
520510 var err error
521511 passphrases = inputpassphrases
522512 addrHex , err = utils .ParamToAddress (addr , am )
@@ -541,16 +531,12 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int, i
541531}
542532
543533func blockRecovery (ctx * cli.Context ) {
544- utils .CheckLegalese (utils .MustDataDir (ctx ))
545-
546534 if len (ctx .Args ()) < 1 {
547535 glog .Fatal ("recover requires block number or hash" )
548536 }
549537 arg := ctx .Args ().First ()
550538
551539 cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
552- utils .CheckLegalese (cfg .DataDir )
553-
554540 blockDb , err := ethdb .NewLDBDatabase (filepath .Join (cfg .DataDir , "blockchain" ), cfg .DatabaseCache )
555541 if err != nil {
556542 glog .Fatalln ("could not open db:" , err )
@@ -611,8 +597,6 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
611597}
612598
613599func accountList (ctx * cli.Context ) {
614- utils .CheckLegalese (utils .MustDataDir (ctx ))
615-
616600 am := utils .MakeAccountManager (ctx )
617601 accts , err := am .Accounts ()
618602 if err != nil {
@@ -664,8 +648,6 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int, inpu
664648}
665649
666650func accountCreate (ctx * cli.Context ) {
667- utils .CheckLegalese (utils .MustDataDir (ctx ))
668-
669651 am := utils .MakeAccountManager (ctx )
670652 passphrase , _ := getPassPhrase (ctx , "Your new account is locked with a password. Please give a password. Do not forget this password." , true , 0 , nil )
671653 acct , err := am .NewAccount (passphrase )
@@ -676,8 +658,6 @@ func accountCreate(ctx *cli.Context) {
676658}
677659
678660func accountUpdate (ctx * cli.Context ) {
679- utils .CheckLegalese (utils .MustDataDir (ctx ))
680-
681661 am := utils .MakeAccountManager (ctx )
682662 arg := ctx .Args ().First ()
683663 if len (arg ) == 0 {
@@ -693,8 +673,6 @@ func accountUpdate(ctx *cli.Context) {
693673}
694674
695675func importWallet (ctx * cli.Context ) {
696- utils .CheckLegalese (utils .MustDataDir (ctx ))
697-
698676 keyfile := ctx .Args ().First ()
699677 if len (keyfile ) == 0 {
700678 utils .Fatalf ("keyfile must be given as argument" )
@@ -715,8 +693,6 @@ func importWallet(ctx *cli.Context) {
715693}
716694
717695func accountImport (ctx * cli.Context ) {
718- utils .CheckLegalese (utils .MustDataDir (ctx ))
719-
720696 keyfile := ctx .Args ().First ()
721697 if len (keyfile ) == 0 {
722698 utils .Fatalf ("keyfile must be given as argument" )
@@ -731,8 +707,6 @@ func accountImport(ctx *cli.Context) {
731707}
732708
733709func makedag (ctx * cli.Context ) {
734- utils .CheckLegalese (utils .MustDataDir (ctx ))
735-
736710 args := ctx .Args ()
737711 wrongArgs := func () {
738712 utils .Fatalf (`Usage: geth makedag <block number> <outputdir>` )
0 commit comments