Browse Source

Fix hex conversion in --unlock and log when successful

Gustav Simonsson 10 years ago
parent
commit
b5b53d8b32
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cmd/geth/main.go

+ 2 - 1
cmd/geth/main.go

@@ -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
 }