aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/accountcmd.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-03-31 04:58:08 +0800
committerFelix Lange <fjl@twurst.com>2016-04-12 21:59:17 +0800
commitaca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e (patch)
tree89a544304580569eb019608606359ba7a1166ebb /cmd/geth/accountcmd.go
parent549f1add296ccfb76d5038316acb4d7c3935221a (diff)
downloadgo-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.tar
go-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.tar.gz
go-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.tar.bz2
go-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.tar.lz
go-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.tar.xz
go-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.tar.zst
go-tangerine-aca9d6a1fb4c2b01d1b8f6e1bf165a39d4b9ac8e.zip
cmd/geth: print actual error when --unlock fails
Diffstat (limited to 'cmd/geth/accountcmd.go')
-rw-r--r--cmd/geth/accountcmd.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go
index 6e8d2b7eb..86175d05f 100644
--- a/cmd/geth/accountcmd.go
+++ b/cmd/geth/accountcmd.go
@@ -181,13 +181,13 @@ func unlockAccount(ctx *cli.Context, accman *accounts.Manager, address string, i
for trials := 0; trials < 3; trials++ {
prompt := fmt.Sprintf("Unlocking account %s | Attempt %d/%d", address, trials+1, 3)
password := getPassPhrase(prompt, false, i, passwords)
- if err := accman.Unlock(account, password); err == nil {
+ if err = accman.Unlock(account, password); err == nil {
glog.V(logger.Info).Infof("Unlocked account %x", account.Address)
return account, password
}
}
// All trials expended to unlock account, bail out
- utils.Fatalf("Failed to unlock account: %s", address)
+ utils.Fatalf("Failed to unlock account %s (%v)", address, err)
return accounts.Account{}, ""
}