diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-06-10 16:23:00 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-06-10 16:23:00 +0800 |
commit | 90e07b19abaa950eaaff2eecc4918b1d16ebbcaf (patch) | |
tree | c742c17da28dc67f41d9779eec0bc3427432e044 /cmd/geth/accountcmd.go | |
parent | 63d1d145e2b2c8db4106d87767842019492e0aea (diff) | |
download | dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.gz dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.bz2 dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.lz dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.xz dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.tar.zst dexon-90e07b19abaa950eaaff2eecc4918b1d16ebbcaf.zip |
cmd: fix CLI package deprecation warnings
Diffstat (limited to 'cmd/geth/accountcmd.go')
-rw-r--r-- | cmd/geth/accountcmd.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index fd5a4bcd4..1415240eb 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -167,11 +167,12 @@ nodes. } ) -func accountList(ctx *cli.Context) { +func accountList(ctx *cli.Context) error { accman := utils.MakeAccountManager(ctx) for i, acct := range accman.Accounts() { fmt.Printf("Account #%d: {%x} %s\n", i, acct.Address, acct.File) } + return nil } // tries unlocking the specified account a few times. @@ -259,7 +260,7 @@ func ambiguousAddrRecovery(am *accounts.Manager, err *accounts.AmbiguousAddrErro } // accountCreate creates a new account into the keystore defined by the CLI flags. -func accountCreate(ctx *cli.Context) { +func accountCreate(ctx *cli.Context) error { accman := utils.MakeAccountManager(ctx) password := getPassPhrase("Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0, utils.MakePasswordList(ctx)) @@ -268,11 +269,12 @@ func accountCreate(ctx *cli.Context) { utils.Fatalf("Failed to create account: %v", err) } fmt.Printf("Address: {%x}\n", account.Address) + return nil } // accountUpdate transitions an account from a previous format to the current // one, also providing the possibility to change the pass-phrase. -func accountUpdate(ctx *cli.Context) { +func accountUpdate(ctx *cli.Context) error { if len(ctx.Args()) == 0 { utils.Fatalf("No accounts specified to update") } @@ -283,9 +285,10 @@ func accountUpdate(ctx *cli.Context) { if err := accman.Update(account, oldPassword, newPassword); err != nil { utils.Fatalf("Could not update the account: %v", err) } + return nil } -func importWallet(ctx *cli.Context) { +func importWallet(ctx *cli.Context) error { keyfile := ctx.Args().First() if len(keyfile) == 0 { utils.Fatalf("keyfile must be given as argument") @@ -303,9 +306,10 @@ func importWallet(ctx *cli.Context) { utils.Fatalf("%v", err) } fmt.Printf("Address: {%x}\n", acct.Address) + return nil } -func accountImport(ctx *cli.Context) { +func accountImport(ctx *cli.Context) error { keyfile := ctx.Args().First() if len(keyfile) == 0 { utils.Fatalf("keyfile must be given as argument") @@ -321,4 +325,5 @@ func accountImport(ctx *cli.Context) { utils.Fatalf("Could not create the account: %v", err) } fmt.Printf("Address: {%x}\n", acct.Address) + return nil } |