aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/main.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-04-28 19:14:53 +0800
committerFelix Lange <fjl@twurst.com>2015-04-29 08:13:36 +0800
commiteb5e43022ed9e50853e00a048ced20dcfdb20524 (patch)
tree18eace985e7b61d9ca498b0179f55c36306d4779 /cmd/mist/main.go
parent71c28cfb0c62c90c6881e4a9b857f8c8f692b5e6 (diff)
downloaddexon-eb5e43022ed9e50853e00a048ced20dcfdb20524.tar.gz
dexon-eb5e43022ed9e50853e00a048ced20dcfdb20524.tar.zst
dexon-eb5e43022ed9e50853e00a048ced20dcfdb20524.zip
cmd/geth, cmd/mist: use gitCommit in node name
Diffstat (limited to 'cmd/mist/main.go')
-rw-r--r--cmd/mist/main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/mist/main.go b/cmd/mist/main.go
index a3c58c901..87181011f 100644
--- a/cmd/mist/main.go
+++ b/cmd/mist/main.go
@@ -41,6 +41,9 @@ const (
)
var (
+ gitCommit string // set via linker flag
+ nodeNameVersion string
+
app = utils.NewApp(Version, "the ether browser")
assetPathFlag = cli.StringFlag{
Name: "asset_path",
@@ -55,6 +58,11 @@ func init() {
if len(rpcCorsFlag.Value) == 0 {
rpcCorsFlag.Value = "http://localhost"
}
+ if gitCommit == "" {
+ nodeNameVersion = Version
+ } else {
+ nodeNameVersion = Version + "-" + gitCommit[:8]
+ }
app.Action = run
app.Flags = []cli.Flag{
@@ -107,7 +115,7 @@ func run(ctx *cli.Context) {
tstart := time.Now()
// TODO: show qml popup instead of exiting if initialization fails.
- cfg := utils.MakeEthConfig(ClientIdentifier, Version, ctx)
+ cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)