aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-17 19:08:16 +0800
committerobscuren <geffobscura@gmail.com>2014-03-17 19:08:16 +0800
commit344e827061c896a17124a65686bdc3fbbd03d7bb (patch)
tree6627309683424ebabe49b988fdba69b2e5337c4f /ethutil
parent826c827e6b1922604601f15361c962aef6f7f1a0 (diff)
downloadgo-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.tar
go-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.tar.gz
go-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.tar.bz2
go-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.tar.lz
go-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.tar.xz
go-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.tar.zst
go-tangerine-344e827061c896a17124a65686bdc3fbbd03d7bb.zip
Added client string to configuration
Clients can set their own client string which will be send to connected peers during the handshake.
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/config.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/ethutil/config.go b/ethutil/config.go
index 5fdc8e1c5..436c12b92 100644
--- a/ethutil/config.go
+++ b/ethutil/config.go
@@ -6,6 +6,7 @@ import (
"os"
"os/user"
"path"
+ "runtime"
)
type LogType byte
@@ -19,12 +20,13 @@ const (
type config struct {
Db Database
- Log *Logger
- ExecPath string
- Debug bool
- Ver string
- Pubkey []byte
- Seed bool
+ Log *Logger
+ ExecPath string
+ Debug bool
+ Ver string
+ ClientString string
+ Pubkey []byte
+ Seed bool
}
var Config *config
@@ -48,6 +50,7 @@ func ReadConfig(base string) *config {
Config = &config{ExecPath: path, Debug: true, Ver: "0.3.1"}
Config.Log = NewLogger(LogFile|LogStd, LogLevelDebug)
+ Config.ClientString = fmt.Sprintf("/Ethereum(G) v%s/%s", Config.Ver, runtime.GOOS)
}
return Config