diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-04-06 03:51:01 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-04-06 03:51:01 +0800 |
commit | 24b9860c1bc214d2db943bc69117818311406bdb (patch) | |
tree | 967fc20530c0c00fc1670afcc50ea17260b95260 | |
parent | cc303017c3f145441e583b5bb10ee3070b44cc50 (diff) | |
download | go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.tar go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.tar.gz go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.tar.bz2 go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.tar.lz go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.tar.xz go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.tar.zst go-tangerine-24b9860c1bc214d2db943bc69117818311406bdb.zip |
cmd/geth, node: surface geth architecture into version (#13866)
-rw-r--r-- | cmd/geth/consolecmd_test.go | 6 | ||||
-rw-r--r-- | cmd/geth/misccmd.go | 3 | ||||
-rw-r--r-- | node/config.go | 2 | ||||
-rw-r--r-- | node/node.go | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/cmd/geth/consolecmd_test.go b/cmd/geth/consolecmd_test.go index 820e9d082..fee8024a9 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/geth/consolecmd_test.go @@ -45,6 +45,7 @@ func TestConsoleWelcome(t *testing.T) { // Gather all the infos the welcome message needs to contain geth.setTemplateFunc("goos", func() string { return runtime.GOOS }) + geth.setTemplateFunc("goarch", func() string { return runtime.GOARCH }) geth.setTemplateFunc("gover", runtime.Version) geth.setTemplateFunc("gethver", func() string { return params.Version }) geth.setTemplateFunc("niltime", func() string { return time.Unix(0, 0).Format(time.RFC1123) }) @@ -58,7 +59,7 @@ func TestConsoleWelcome(t *testing.T) { geth.expect(` Welcome to the Geth JavaScript console! -instance: Geth/v{{gethver}}/{{goos}}/{{gover}} +instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} coinbase: {{.Etherbase}} at block: 0 ({{niltime}}) datadir: {{.Datadir}} @@ -131,6 +132,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint string) { // Gather all the infos the welcome message needs to contain attach.setTemplateFunc("goos", func() string { return runtime.GOOS }) + attach.setTemplateFunc("goarch", func() string { return runtime.GOARCH }) attach.setTemplateFunc("gover", runtime.Version) attach.setTemplateFunc("gethver", func() string { return params.Version }) attach.setTemplateFunc("etherbase", func() string { return geth.Etherbase }) @@ -152,7 +154,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint string) { attach.expect(` Welcome to the Geth JavaScript console! -instance: Geth/v{{gethver}}/{{goos}}/{{gover}} +instance: Geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} coinbase: {{etherbase}} at block: 0 ({{niltime}}){{if ipc}} datadir: {{datadir}}{{end}} diff --git a/cmd/geth/misccmd.go b/cmd/geth/misccmd.go index 079f49310..cb7dc1673 100644 --- a/cmd/geth/misccmd.go +++ b/cmd/geth/misccmd.go @@ -101,10 +101,11 @@ func version(ctx *cli.Context) error { if gitCommit != "" { fmt.Println("Git Commit:", gitCommit) } + fmt.Println("Architecture:", runtime.GOARCH) fmt.Println("Protocol Versions:", eth.ProtocolVersions) fmt.Println("Network Id:", ctx.GlobalInt(utils.NetworkIdFlag.Name)) fmt.Println("Go Version:", runtime.Version()) - fmt.Println("OS:", runtime.GOOS) + fmt.Println("Operating System:", runtime.GOOS) fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH")) fmt.Printf("GOROOT=%s\n", runtime.GOROOT()) return nil diff --git a/node/config.go b/node/config.go index 608c9a6b4..b060b05f2 100644 --- a/node/config.go +++ b/node/config.go @@ -266,7 +266,7 @@ func (c *Config) NodeName() string { if c.Version != "" { name += "/v" + c.Version } - name += "/" + runtime.GOOS + name += "/" + runtime.GOOS + "-" + runtime.GOARCH name += "/" + runtime.Version() return name } diff --git a/node/node.go b/node/node.go index c7e28af37..afb676b7f 100644 --- a/node/node.go +++ b/node/node.go @@ -173,7 +173,7 @@ func (n *Node) Start() error { MaxPendingPeers: n.config.MaxPendingPeers, } running := &p2p.Server{Config: n.serverConfig} - log.Info(fmt.Sprint("instance:", n.serverConfig.Name)) + log.Info("Starting peer-to-peer node", "instance", n.serverConfig.Name) // Otherwise copy and specialize the P2P configuration services := make(map[reflect.Type]Service) |