|
|
@ -129,6 +129,7 @@ runtime will execute the file and exit. |
|
|
|
utils.RPCEnabledFlag, |
|
|
|
utils.RPCEnabledFlag, |
|
|
|
utils.RPCListenAddrFlag, |
|
|
|
utils.RPCListenAddrFlag, |
|
|
|
utils.RPCPortFlag, |
|
|
|
utils.RPCPortFlag, |
|
|
|
|
|
|
|
utils.UnencryptedKeysFlag, |
|
|
|
utils.VMDebugFlag, |
|
|
|
utils.VMDebugFlag, |
|
|
|
//utils.VMTypeFlag,
|
|
|
|
//utils.VMTypeFlag,
|
|
|
|
} |
|
|
|
} |
|
|
@ -230,20 +231,24 @@ func accountList(ctx *cli.Context) { |
|
|
|
|
|
|
|
|
|
|
|
func accountCreate(ctx *cli.Context) { |
|
|
|
func accountCreate(ctx *cli.Context) { |
|
|
|
am := utils.GetAccountManager(ctx) |
|
|
|
am := utils.GetAccountManager(ctx) |
|
|
|
fmt.Println("The new account will be encrypted with a passphrase.") |
|
|
|
passphrase := "" |
|
|
|
fmt.Println("Please enter a passphrase now.") |
|
|
|
if !ctx.GlobalBool(utils.UnencryptedKeysFlag.Name) { |
|
|
|
auth, err := readPassword("Passphrase: ", true) |
|
|
|
fmt.Println("The new account will be encrypted with a passphrase.") |
|
|
|
if err != nil { |
|
|
|
fmt.Println("Please enter a passphrase now.") |
|
|
|
utils.Fatalf("%v", err) |
|
|
|
auth, err := readPassword("Passphrase: ", true) |
|
|
|
} |
|
|
|
if err != nil { |
|
|
|
confirm, err := readPassword("Repeat Passphrase: ", false) |
|
|
|
utils.Fatalf("%v", err) |
|
|
|
if err != nil { |
|
|
|
} |
|
|
|
utils.Fatalf("%v", err) |
|
|
|
confirm, err := readPassword("Repeat Passphrase: ", false) |
|
|
|
} |
|
|
|
if err != nil { |
|
|
|
if auth != confirm { |
|
|
|
utils.Fatalf("%v", err) |
|
|
|
utils.Fatalf("Passphrases did not match.") |
|
|
|
} |
|
|
|
|
|
|
|
if auth != confirm { |
|
|
|
|
|
|
|
utils.Fatalf("Passphrases did not match.") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
passphrase = auth |
|
|
|
} |
|
|
|
} |
|
|
|
acct, err := am.NewAccount(auth) |
|
|
|
acct, err := am.NewAccount(passphrase) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
utils.Fatalf("Could not create the account: %v", err) |
|
|
|
utils.Fatalf("Could not create the account: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|