diff options
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/accountcmd.go | 2 | ||||
-rw-r--r-- | cmd/geth/main.go | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index 1415240eb..7fea16a25 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -316,7 +316,7 @@ func accountImport(ctx *cli.Context) error { } key, err := crypto.LoadECDSA(keyfile) if err != nil { - utils.Fatalf("keyfile must be given as argument") + utils.Fatalf("Failed to load the private key: %v", err) } accman := utils.MakeAccountManager(ctx) passphrase := getPassPhrase("Your new account is locked with a password. Please give a password. Do not forget this password.", true, 0, utils.MakePasswordList(ctx)) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index c372430f1..cb43f8769 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -29,6 +29,7 @@ import ( "time" "github.com/ethereum/ethash" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/console" @@ -309,15 +310,16 @@ func initGenesis(ctx *cli.Context) error { // it unlocks any requested accounts, and starts the RPC/IPC interfaces and the // miner. func startNode(ctx *cli.Context, stack *node.Node) { + // Report geth version + glog.V(logger.Info).Infof("instance: Geth/%s/%s/%s\n", verString, runtime.Version(), runtime.GOOS) // Start up the node itself utils.StartNode(stack) // Unlock any account specifically requested - var ethereum *eth.Ethereum - if err := stack.Service(ðereum); err != nil { + var accman *accounts.Manager + if err := stack.Service(&accman); err != nil { utils.Fatalf("ethereum service not running: %v", err) } - accman := ethereum.AccountManager() passwords := utils.MakePasswordList(ctx) accounts := strings.Split(ctx.GlobalString(utils.UnlockedAccountFlag.Name), ",") @@ -328,6 +330,10 @@ func startNode(ctx *cli.Context, stack *node.Node) { } // Start auxiliary services if enabled if ctx.GlobalBool(utils.MiningEnabledFlag.Name) { + var ethereum *eth.Ethereum + if err := stack.Service(ðereum); err != nil { + utils.Fatalf("ethereum service not running: %v", err) + } if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name), ctx.GlobalString(utils.MiningGPUFlag.Name)); err != nil { utils.Fatalf("Failed to start mining: %v", err) } |