aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-27 04:08:15 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-27 04:08:15 +0800
commit829240c3252d9da09c9000e42b0686425a313e8b (patch)
tree5b5fe5aeb443a8fd8a325743490b8fb416a903d3 /cmd/utils/flags.go
parent658204bafcba6332e979aee690dc5cff6e46fb42 (diff)
parent7577d1261403dbabdb30e21415d34b4e5da466ec (diff)
downloaddexon-829240c3252d9da09c9000e42b0686425a313e8b.tar
dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.gz
dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.bz2
dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.lz
dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.xz
dexon-829240c3252d9da09c9000e42b0686425a313e8b.tar.zst
dexon-829240c3252d9da09c9000e42b0686425a313e8b.zip
Merge pull request #550 from ethersphere/frontier/cli-key
import/export accounts
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go20
1 files changed, 8 insertions, 12 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 94b043d73..f948cdb06 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -97,14 +97,15 @@ var (
Usage: "Enable mining",
}
- // key settings
- UnencryptedKeysFlag = cli.BoolFlag{
- Name: "unencrypted-keys",
- Usage: "disable private key disk encryption (for testing)",
- }
UnlockedAccountFlag = cli.StringFlag{
Name: "unlock",
- Usage: "Unlock a given account untill this programs exits (address:password)",
+ Usage: "unlock the account given until this program exits (prompts for password). '--unlock coinbase' unlocks the primary (coinbase) account",
+ Value: "",
+ }
+ PasswordFileFlag = cli.StringFlag{
+ Name: "password",
+ Usage: "Path to password file for (un)locking an existing account.",
+ Value: "",
}
// logging and debug settings
@@ -243,12 +244,7 @@ func GetChain(ctx *cli.Context) (*core.ChainManager, common.Database, common.Dat
func GetAccountManager(ctx *cli.Context) *accounts.Manager {
dataDir := ctx.GlobalString(DataDirFlag.Name)
- var ks crypto.KeyStore2
- if ctx.GlobalBool(UnencryptedKeysFlag.Name) {
- ks = crypto.NewKeyStorePlain(path.Join(dataDir, "plainkeys"))
- } else {
- ks = crypto.NewKeyStorePassphrase(path.Join(dataDir, "keys"))
- }
+ ks := crypto.NewKeyStorePassphrase(path.Join(dataDir, "keys"))
return accounts.NewManager(ks)
}