aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-12-01 18:20:49 +0800
committerFelix Lange <fjl@twurst.com>2015-12-01 18:55:52 +0800
commitd648e96b3d2c52074b6085ceb26e5f2755257791 (patch)
tree05b7823846836ceb37c5dad5e3a7abe65031234e /cmd/geth
parentf4a6470a7b1eabb49e5dba56a46df650f23599aa (diff)
downloaddexon-d648e96b3d2c52074b6085ceb26e5f2755257791.tar
dexon-d648e96b3d2c52074b6085ceb26e5f2755257791.tar.gz
dexon-d648e96b3d2c52074b6085ceb26e5f2755257791.tar.bz2
dexon-d648e96b3d2c52074b6085ceb26e5f2755257791.tar.lz
dexon-d648e96b3d2c52074b6085ceb26e5f2755257791.tar.xz
dexon-d648e96b3d2c52074b6085ceb26e5f2755257791.tar.zst
dexon-d648e96b3d2c52074b6085ceb26e5f2755257791.zip
cmd/utils: restore starting geth without any accounts and etherbase
Also remove some duplication around address/index parsing.
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 3a5471845..6ec30cebc 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -464,9 +464,12 @@ func execScripts(ctx *cli.Context) {
node.Stop()
}
+// tries unlocking the specified account a few times.
func unlockAccount(ctx *cli.Context, accman *accounts.Manager, address string, i int, passwords []string) (common.Address, string) {
- // Try to unlock the specified account a few times
- account := utils.MakeAddress(accman, address)
+ account, err := utils.MakeAddress(accman, address)
+ if err != nil {
+ utils.Fatalf("Unlock error: %v", err)
+ }
for trials := 0; trials < 3; trials++ {
prompt := fmt.Sprintf("Unlocking account %s | Attempt %d/%d", address, trials+1, 3)