aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r--cmd/geth/main.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index e18b92a2e..ddbd1f129 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -24,13 +24,13 @@ import (
"bufio"
"fmt"
"io/ioutil"
- "log"
- "net/http"
"os"
"runtime"
"strconv"
"time"
+ "path"
+
"github.com/codegangsta/cli"
"github.com/ethereum/ethash"
"github.com/ethereum/go-ethereum/accounts"
@@ -42,13 +42,12 @@ import (
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/logger"
"github.com/peterh/liner"
- "path"
)
import _ "net/http/pprof"
const (
ClientIdentifier = "Geth"
- Version = "0.9.9"
+ Version = "0.9.11"
)
var app = utils.NewApp(Version, "the go-ethereum command line interface")
@@ -217,6 +216,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
},
}
app.Flags = []cli.Flag{
+ utils.IdentityFlag,
utils.UnlockedAccountFlag,
utils.PasswordFileFlag,
utils.BootnodesFlag,
@@ -229,11 +229,13 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils.MinerThreadsFlag,
utils.MiningEnabledFlag,
utils.NATFlag,
+ utils.NatspecEnabledFlag,
utils.NodeKeyFileFlag,
utils.NodeKeyHexFlag,
utils.RPCEnabledFlag,
utils.RPCListenAddrFlag,
utils.RPCPortFlag,
+ utils.WhisperEnabledFlag,
utils.VMDebugFlag,
utils.ProtocolVersionFlag,
utils.NetworkIdFlag,
@@ -244,6 +246,14 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils.LogVModuleFlag,
utils.LogFileFlag,
utils.LogJSONFlag,
+ utils.PProfEanbledFlag,
+ utils.PProfPortFlag,
+ }
+ app.Before = func(ctx *cli.Context) error {
+ if ctx.GlobalBool(utils.PProfEanbledFlag.Name) {
+ utils.StartPProf(ctx)
+ }
+ return nil
}
// missing:
@@ -258,11 +268,6 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
}
func main() {
- // Start up the default http server for pprof
- go func() {
- log.Println(http.ListenAndServe("localhost:6060", nil))
- }()
-
fmt.Printf("Welcome to the FRONTIER\n")
runtime.GOMAXPROCS(runtime.NumCPU())
defer logger.Flush()
@@ -334,6 +339,7 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (pass
}
func startEth(ctx *cli.Context, eth *eth.Ethereum) {
+ // Start Ethereum itself
utils.StartEthereum(eth)
am := eth.AccountManager()