@@ -405,8 +405,6 @@ func makeDefaultExtra() []byte {
405
405
}
406
406
407
407
func run (ctx * cli.Context ) {
408
- utils .CheckLegalese (utils .MustDataDir (ctx ))
409
-
410
408
cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
411
409
cfg .ExtraData = makeExtra (ctx )
412
410
@@ -421,8 +419,6 @@ func run(ctx *cli.Context) {
421
419
}
422
420
423
421
func attach (ctx * cli.Context ) {
424
- utils .CheckLegalese (utils .MustDataDir (ctx ))
425
-
426
422
var client comms.EthereumClient
427
423
var err error
428
424
if ctx .Args ().Present () {
@@ -454,8 +450,6 @@ func attach(ctx *cli.Context) {
454
450
}
455
451
456
452
func console (ctx * cli.Context ) {
457
- utils .CheckLegalese (utils .MustDataDir (ctx ))
458
-
459
453
cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
460
454
cfg .ExtraData = makeExtra (ctx )
461
455
@@ -488,8 +482,6 @@ func console(ctx *cli.Context) {
488
482
}
489
483
490
484
func execJSFiles (ctx * cli.Context ) {
491
- utils .CheckLegalese (utils .MustDataDir (ctx ))
492
-
493
485
cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
494
486
ethereum , err := eth .New (cfg )
495
487
if err != nil {
@@ -515,8 +507,6 @@ func execJSFiles(ctx *cli.Context) {
515
507
}
516
508
517
509
func 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
-
520
510
var err error
521
511
passphrases = inputpassphrases
522
512
addrHex , err = utils .ParamToAddress (addr , am )
@@ -541,16 +531,12 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int, i
541
531
}
542
532
543
533
func blockRecovery (ctx * cli.Context ) {
544
- utils .CheckLegalese (utils .MustDataDir (ctx ))
545
-
546
534
if len (ctx .Args ()) < 1 {
547
535
glog .Fatal ("recover requires block number or hash" )
548
536
}
549
537
arg := ctx .Args ().First ()
550
538
551
539
cfg := utils .MakeEthConfig (ClientIdentifier , nodeNameVersion , ctx )
552
- utils .CheckLegalese (cfg .DataDir )
553
-
554
540
blockDb , err := ethdb .NewLDBDatabase (filepath .Join (cfg .DataDir , "blockchain" ), cfg .DatabaseCache )
555
541
if err != nil {
556
542
glog .Fatalln ("could not open db:" , err )
@@ -611,8 +597,6 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
611
597
}
612
598
613
599
func accountList (ctx * cli.Context ) {
614
- utils .CheckLegalese (utils .MustDataDir (ctx ))
615
-
616
600
am := utils .MakeAccountManager (ctx )
617
601
accts , err := am .Accounts ()
618
602
if err != nil {
@@ -664,8 +648,6 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int, inpu
664
648
}
665
649
666
650
func accountCreate (ctx * cli.Context ) {
667
- utils .CheckLegalese (utils .MustDataDir (ctx ))
668
-
669
651
am := utils .MakeAccountManager (ctx )
670
652
passphrase , _ := getPassPhrase (ctx , "Your new account is locked with a password. Please give a password. Do not forget this password." , true , 0 , nil )
671
653
acct , err := am .NewAccount (passphrase )
@@ -676,8 +658,6 @@ func accountCreate(ctx *cli.Context) {
676
658
}
677
659
678
660
func accountUpdate (ctx * cli.Context ) {
679
- utils .CheckLegalese (utils .MustDataDir (ctx ))
680
-
681
661
am := utils .MakeAccountManager (ctx )
682
662
arg := ctx .Args ().First ()
683
663
if len (arg ) == 0 {
@@ -693,8 +673,6 @@ func accountUpdate(ctx *cli.Context) {
693
673
}
694
674
695
675
func importWallet (ctx * cli.Context ) {
696
- utils .CheckLegalese (utils .MustDataDir (ctx ))
697
-
698
676
keyfile := ctx .Args ().First ()
699
677
if len (keyfile ) == 0 {
700
678
utils .Fatalf ("keyfile must be given as argument" )
@@ -715,8 +693,6 @@ func importWallet(ctx *cli.Context) {
715
693
}
716
694
717
695
func accountImport (ctx * cli.Context ) {
718
- utils .CheckLegalese (utils .MustDataDir (ctx ))
719
-
720
696
keyfile := ctx .Args ().First ()
721
697
if len (keyfile ) == 0 {
722
698
utils .Fatalf ("keyfile must be given as argument" )
@@ -731,8 +707,6 @@ func accountImport(ctx *cli.Context) {
731
707
}
732
708
733
709
func makedag (ctx * cli.Context ) {
734
- utils .CheckLegalese (utils .MustDataDir (ctx ))
735
-
736
710
args := ctx .Args ()
737
711
wrongArgs := func () {
738
712
utils .Fatalf (`Usage: geth makedag <block number> <outputdir>` )
0 commit comments