diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-07-16 21:49:36 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-07-21 00:49:25 +0800 |
commit | cf5313f13ee0a149742f1aeb21e920385e97ecd4 (patch) | |
tree | 4fc4627a1b117011047cbadf9c2c15958a8d61a9 /cmd/geth | |
parent | 618991f136d1f7c66d600a20d2519d4caba92e4a (diff) | |
download | go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.tar go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.tar.gz go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.tar.bz2 go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.tar.lz go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.tar.xz go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.tar.zst go-tangerine-cf5313f13ee0a149742f1aeb21e920385e97ecd4.zip |
Update disclaimer
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/main.go | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 8099d4dc6..a8649a304 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -345,8 +345,9 @@ func main() { } func run(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) - utils.CheckLegalese(cfg.DataDir) ethereum, err := eth.New(cfg) if err != nil { utils.Fatalf("%v", err) @@ -358,6 +359,8 @@ func run(ctx *cli.Context) { } func attach(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + // Wrap the standard output with a colorified stream (windows) if isatty.IsTerminal(os.Stdout.Fd()) { if pr, pw, err := os.Pipe(); err == nil { @@ -396,6 +399,8 @@ func attach(ctx *cli.Context) { } func console(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + // Wrap the standard output with a colorified stream (windows) if isatty.IsTerminal(os.Stdout.Fd()) { if pr, pw, err := os.Pipe(); err == nil { @@ -405,7 +410,6 @@ func console(ctx *cli.Context) { } cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) - utils.CheckLegalese(cfg.DataDir) ethereum, err := eth.New(cfg) if err != nil { utils.Fatalf("%v", err) @@ -435,8 +439,9 @@ func console(ctx *cli.Context) { } func execJSFiles(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx) - utils.CheckLegalese(cfg.DataDir) ethereum, err := eth.New(cfg) if err != nil { utils.Fatalf("%v", err) @@ -461,6 +466,8 @@ func execJSFiles(ctx *cli.Context) { } func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (addrHex, auth string) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + var err error addrHex, err = utils.ParamToAddress(addr, am) if err == nil { @@ -484,6 +491,8 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) ( } func blockRecovery(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + arg := ctx.Args().First() if len(ctx.Args()) < 1 && len(arg) > 0 { glog.Fatal("recover requires block number or hash") @@ -549,6 +558,8 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) { } func accountList(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + am := utils.MakeAccountManager(ctx) accts, err := am.Accounts() if err != nil { @@ -597,6 +608,8 @@ func getPassPhrase(ctx *cli.Context, desc string, confirmation bool, i int) (pas } func accountCreate(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + am := utils.MakeAccountManager(ctx) passphrase := getPassPhrase(ctx, "Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0) acct, err := am.NewAccount(passphrase) @@ -607,6 +620,8 @@ func accountCreate(ctx *cli.Context) { } func accountUpdate(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + am := utils.MakeAccountManager(ctx) arg := ctx.Args().First() if len(arg) == 0 { @@ -622,6 +637,8 @@ func accountUpdate(ctx *cli.Context) { } func importWallet(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + keyfile := ctx.Args().First() if len(keyfile) == 0 { utils.Fatalf("keyfile must be given as argument") @@ -642,6 +659,8 @@ func importWallet(ctx *cli.Context) { } func accountImport(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + keyfile := ctx.Args().First() if len(keyfile) == 0 { utils.Fatalf("keyfile must be given as argument") @@ -656,6 +675,8 @@ func accountImport(ctx *cli.Context) { } func makedag(ctx *cli.Context) { + utils.CheckLegalese(ctx.GlobalString(utils.DataDirFlag.Name)) + args := ctx.Args() wrongArgs := func() { utils.Fatalf(`Usage: geth makedag <block number> <outputdir>`) |