Merge pull request #946 from Gustav-Simonsson/fix_geth_unlock_account

Fix hex conversion in --unlock and log when successful
This commit is contained in:
Jeffrey Wilcke 2015-05-13 01:58:32 -07:00
commit 6dec90464d
1 changed files with 2 additions and 1 deletions

View File

@ -368,10 +368,11 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (pass
if len(account) == 0 {
utils.Fatalf("Invalid account address '%s'", account)
}
err = am.Unlock(common.StringToAddress(account), passphrase)
err = am.Unlock(common.HexToAddress(account), passphrase)
if err != nil {
utils.Fatalf("Unlock account failed '%v'", err)
}
fmt.Printf("Account '%s' unlocked.\n", account)
return
}