aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-12 22:24:34 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-12 22:24:34 +0800
commitb006b677683071c5e114d17649262ed414ba1779 (patch)
tree1a27e437dd599bd1277b4ce4587bcd89ceeed4c7 /ethutil
parent4418e4ea6a9b8d648bcb7e7241b887cbab6936bc (diff)
parent2a0e5888fdd357553e31bcee4264d9db6f486f39 (diff)
downloaddexon-b006b677683071c5e114d17649262ed414ba1779.tar
dexon-b006b677683071c5e114d17649262ed414ba1779.tar.gz
dexon-b006b677683071c5e114d17649262ed414ba1779.tar.bz2
dexon-b006b677683071c5e114d17649262ed414ba1779.tar.lz
dexon-b006b677683071c5e114d17649262ed414ba1779.tar.xz
dexon-b006b677683071c5e114d17649262ed414ba1779.tar.zst
dexon-b006b677683071c5e114d17649262ed414ba1779.zip
Merge branch 'develop' into rpcfrontier
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/common.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index 9b66763b8..3ade7fd16 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -13,6 +13,13 @@ import (
"github.com/kardianos/osext"
)
+// MakeName creates a node name that follows the ethereum convention
+// for such names. It adds the operation system name and Go runtime version
+// the name.
+func MakeName(name, version string) string {
+ return fmt.Sprintf("%s/v%s/%s/%s", name, version, runtime.GOOS, runtime.Version())
+}
+
func DefaultAssetPath() string {
var assetPath string
pwd, _ := os.Getwd()