diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-13 01:00:35 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-13 01:00:35 +0800 |
commit | d6357aa616715df1e98cfb90c3aa5372e15cc24b (patch) | |
tree | 3f1792e7d71a82de0ceb6047eaf87f2f72aa82ff /cmd/geth/main.go | |
parent | 58d6ec689ff44232cd5d6a7cbbaad2d7a2cb44bd (diff) | |
parent | e389585f1f2e77fd7cd507499015bf3754581e4e (diff) | |
download | go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.gz go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.tar.zst go-tangerine-d6357aa616715df1e98cfb90c3aa5372e15cc24b.zip |
Merge pull request #631 from Gustav-Simonsson/improve_key_store_crypto
Improve key store crypto
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r-- | cmd/geth/main.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 5fe83a2a0..dbcfe8175 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -365,11 +365,10 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (pass // Load startup keys. XXX we are going to need a different format // Attempt to unlock the account passphrase = getPassPhrase(ctx, "", false) - accbytes := common.FromHex(account) - if len(accbytes) == 0 { + if len(account) == 0 { utils.Fatalf("Invalid account address '%s'", account) } - err = am.Unlock(accbytes, passphrase) + err = am.Unlock(common.StringToAddress(account), passphrase) if err != nil { utils.Fatalf("Unlock account failed '%v'", err) } @@ -385,11 +384,11 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) { account := ctx.GlobalString(utils.UnlockedAccountFlag.Name) if len(account) > 0 { if account == "primary" { - accbytes, err := am.Primary() + primaryAcc, err := am.Primary() if err != nil { utils.Fatalf("no primary account: %v", err) } - account = common.ToHex(accbytes) + account = primaryAcc.Hex() } unlockAccount(ctx, am, account) } |