aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-07 17:55:33 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-07 17:55:33 +0800
commite5fba8fd7025bb45a88a19c1bbef80db5bd3b688 (patch)
treeb17726c936fcb695e26b2a145b5d423b8556871b /cmd/geth
parent916d1554675974adb92af4046e1b04ad3b26dca3 (diff)
parent37c1a8f69de44827a60296342189b6719a49dbc3 (diff)
downloaddexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar
dexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.gz
dexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.bz2
dexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.lz
dexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.xz
dexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.zst
dexon-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.zip
Merge pull request #1428 from obscuren/coinbase-fixes
cmd,eth,rpc,tests: default coinbase
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/main.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 3428bb4cf..a05bb4db5 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -461,22 +461,7 @@ func execJSFiles(ctx *cli.Context) {
func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (addrHex, auth string) {
var err error
- // Load startup keys. XXX we are going to need a different format
-
- if !((len(addr) == 40) || (len(addr) == 42)) { // with or without 0x
- var index int
- index, err = strconv.Atoi(addr)
- if err != nil {
- utils.Fatalf("Invalid account address '%s'", addr)
- }
-
- addrHex, err = am.AddressByIndex(index)
- if err != nil {
- utils.Fatalf("%v", err)
- }
- } else {
- addrHex = addr
- }
+ addrHex = utils.ParamToAddress(addr, am)
// Attempt to unlock the account 3 times
attempts := 3
for tries := 0; tries < attempts; tries++ {